ML::NeuralNetwork
Inherits ML::Predictor < Reference < Object
Simple feedforward neural network
Constructors
new(layer_sizes : Array(Int32), learning_rate : Float64 = 0.01)
Instance methods
layers
learning_rate
load_weights(weights : Array(Array(Array(Array(Float64)))))
Load network weights
predict(input : Array(Float64)) : Array(Float64)
Forward propagation
save_weights
Save network weights
train(data : TrainingData, epochs : Int32 = 100)
Train the network
train_online(input : Array(Float64), target : Array(Float64))
Train on single example (online learning)