Attempt to create a Neural Network in Java
The constructor takes in the number of nodes in each layer of the network. Number of layers can be any integer value.
The first value in the constructor is interpreted as the number of input nodes.
The last value in the constructor is interpreted as the number of output nodes.
All the other middle layers are the number of hidden nodes in each hidden layers.
void feed_forward() function predicts the output based on the input.
void backpropagation() tries to compute the errors and adjust the weights and biases accordingly.
File that holds
the total number of layers (i.e., 1st value in file),
the number of nodes in each of those layers thereafter.
Computed weights and biases according to the training data, generated by the backpropagation algorithm.
Training the model further will result in modification of this file.
Moreover, these values are loaded in the weight and bias matrices while predicting any output.