This function computes the gradient for a two hidden layer network.
computeGrad2(x, y, I, M, H, weights, f, f_d, m_f)
properties of observation
characteristic of observation (zero or one)
numbers of input neurons
number of neurons in first hidden layer
number of neurons in second hidden layer
the weights with that the gradient should be computed
the activation function of the neural network
the derivative of the activation function
the function for the interim value m. It is two times the output of the network minus the observed characteristic.
A Weights2 class with the gradient parts