Neat-Ex v1.3.0 Ann
A module for storing and (de)serializing ANNs (artificial neural networks).
Summary
Functions
Forms connections between all of an ANN’s input and output neurons with weights generated by weightGenFun. Default is a normal distribution with mean 0 and variance 0.05
Returns the JSON representation of a given ANN
Creates a new ANN from the given JSON
Creates a new ANN from a list of input IDs, a list of output IDs, and an optional list of connections.
If connections
is not provided, or is nil, then Ann.connectAll/1
will be used to connect the inputs
to the outputs. If an ANN with no topology is needed, provide %{}
as connections
Creates a large feedForward network with hidden layers. hiddenMatrix
is a list where each element represents the number of hidden nodes existing at that layer
Saves a given binary to a given file path. Overwrites data previously exiting in the file
Generates the GraphViz representation of the neural network, then saves it to the given path
Returns a string with a GraphViz representation of a neural network
Functions
Forms connections between all of an ANN’s input and output neurons with weights generated by weightGenFun. Default is a normal distribution with mean 0 and variance 0.05.
Creates a new ANN from a list of input IDs, a list of output IDs, and an optional list of connections.
If connections
is not provided, or is nil, then Ann.connectAll/1
will be used to connect the inputs
to the outputs. If an ANN with no topology is needed, provide %{}
as connections
Example:
iex> Ann.new([0, 1], [2], %{0 => Ann.Connection.new(0, 2, 0.5)}) #connects 0 to 2 with a weight of 0.5 (and an id of 0)
%Ann{connections: %{0 => Ann.Connection.new(0, 2, 0.5)}, input: [0, 1], output: [2]}
Creates a large feedForward network with hidden layers. hiddenMatrix
is a list where each element represents the number of hidden nodes existing at that layer.
Saves a given binary to a given file path. Overwrites data previously exiting in the file.
Generates the GraphViz representation of the neural network, then saves it to the given path.