home > kero > Documentation

Perform neural network training using the specified methods in the specified settings.

kero.multib.NeuralNetwork.py class NetworkUpdater: def update_wb(self, input_set, Y0_set, weights, biases, AF, mse_mode="compute_only", verbose=False): return weights_next, biases_next, mse_list

**Arguments/Return**

input_set | list of numpy matrix [x]. Each x a column vector m x 1, m the number of neurons in input layer |

Y0_set | list of numpy matrix [Y0]. Each Y0 nx1, where n is the no of neurons in layer l=L. The true/observed values in the output layer corresponding to the input set. In another words, for each k=1,…,N, Y0_set[k] = f(x[k]) where f is the true function that our neural network is modelling and N the number of data points. |

weights | the collection of weights in the neural network.
weights is a list [w_l], where w_l is the collection of weights between the (l-1)-th and l-th layer for l=2,3,…,L where l=1 is the input layer, l=2 the first hidden layer and l=L is the output layer. w_l is a matrix (list of list) so that w_l[i][j] is the weight between neuron j at layer l-1 and neuron i at layer l |

biases | the collection of biases in the neural network.
biases is a list [b_l], where b_l is the collection of biases in the l-th layer for l=2,3,…,L |

AF | AF (activationFunction). Assume it is initiated. |

mse_mode | String.
If mse_mode=”compute_only”, then mse_list will be returned, containing the cost function MSE (mean squared value) at each epoch of training. If mse_mode= “compute_and_print”, the MSE value at each epoch will be printed. If mse_mode=None, mse_list is None i.e. MSE value is not computed. Default=”compute_only” |

verbose | Bool False or integer
The larger the integer, the more information is printed. Set them to suitable integers for debugging. Default=False |

return weights_next | Same as weights, but has undergone 1 gradient descent iteration. |

return biases_next | Same as biases, but has undergone 1 gradient descent iteration. |

return mse_list | List of float [mse]. See mse_mode. |

**Example Usage 1**

See Deep Learning and Neural Network with kero PART 2.

*kero version: 0.6.2*