neural_network::construct()← Back to Class neural_network
The constructor. Create an instance of class neural_network
neural_network::construct(layers = [], learning_rate = 0.01)
layers (array, optional) — The model's layer specification. The default value is [] which means there are no layers in the model by defaultlearning_rate (number, optional) — The hyperparameter for the model. The default value is 0.01
neural_network — Returns the instance of class neural_network
import neural
model = neural_network([784, 20, 10, 10], 0.01) ' Construct the model with 784 inputs, 2 hidden layers, 10 outputs,
' and learning rate: 0.01