class Ai4cr::NeuralNetwork::Cmn::Chain

Included Modules

Defined in:

ai4cr/neural_network/cmn/chain.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(net_set : Array(Ai4cr::NeuralNetwork::Cmn::MiniNet)) #

NOTE When passing in the array for net_set, .. if you're including just one type of MiniNet, e.g.: net0 = Ai4cr::NeuralNetwork::Cmn::MiniNet::Sigmoid.new(height: 256, width: 300, history_size: 60) net1 = Ai4cr::NeuralNetwork::Cmn::MiniNet::Sigmoid.new(height: 300, width: 3, history_size: 60)

... and you try to pass in like below, you'll get a type error: cns = Ai4cr::NeuralNetwork::Cmn::Chain.new([net0, net1])

... So, you'll need to init the array like: arr = Array(Ai4cr::NeuralNetwork::Cmn::MiniNet).new arr << net0 arr << net1

... and then pass it in like: cns = Ai4cr::NeuralNetwork::Cmn::Chain.new(arr)


[View source]

Instance Method Detail

def calc_structure #

[View source]
def error_stats #

[View source]
def errors : Array(Hash(Symbol, Int32)) #

[View source]
def eval(inputs_given) #

[View source]
def guesses_best #

[View source]
def net_set : Array(MiniNet) #

[View source]
def net_set=(net_set : Array(MiniNet)) #

[View source]
def net_set_indexes_reversed : Array(Int32) #

[View source]
def net_set_size : Int32 #

[View source]
def structure : Array(Int32) #

[View source]
def train(inputs_given, outputs_expected, until_min_avg_error = 0.1) #

TODO utilize until_min_avg_error


[View source]
def validate #

[View source]
def validate! #

[View source]
def weight_height_mismatches : Array(Hash(Symbol, Int32)) #

[View source]