Neuron.LSTM
type neuron_typ = {
mutable wxi : Optimise.Algodiff.t;
mutable whi : Optimise.Algodiff.t;
mutable wxc : Optimise.Algodiff.t;
mutable whc : Optimise.Algodiff.t;
mutable wxf : Optimise.Algodiff.t;
mutable whf : Optimise.Algodiff.t;
mutable wxo : Optimise.Algodiff.t;
mutable who : Optimise.Algodiff.t;
mutable bi : Optimise.Algodiff.t;
mutable bc : Optimise.Algodiff.t;
mutable bf : Optimise.Algodiff.t;
mutable bo : Optimise.Algodiff.t;
mutable c : Optimise.Algodiff.t;
mutable h : Optimise.Algodiff.t;
mutable init_typ : Init.typ;
mutable in_shape : int array;
mutable out_shape : int array;
}
Neuron type definition.
val create : ?time_steps:int -> ?inputs:int -> int -> Init.typ -> neuron_typ
Create the neuron.
val connect : int array -> neuron_typ -> unit
Connect this neuron to others in a neural network.
val init : neuron_typ -> unit
Initialise the neuron and its parameters.
val reset : neuron_typ -> unit
Reset the parameters in a neuron.
val mktag : int -> neuron_typ -> unit
Tag the neuron, used by Algodiff
module.
val mkpar : neuron_typ -> Optimise.Algodiff.t array
Assemble all the parameters in an array, used by Optimise
module.
val mkpri : neuron_typ -> Optimise.Algodiff.t array
Assemble all the primial values in an array, used by Optimise
module.
val mkadj : neuron_typ -> Optimise.Algodiff.t array
Assemble all the adjacent values in an array, used by Optimise
module.
val update : neuron_typ -> Optimise.Algodiff.t array -> unit
Update parameters in a neuron, used by Optimise
module.
val copy : neuron_typ -> neuron_typ
Make a deep copy of the neuron and its parameters.
val run : Optimise.Algodiff.t -> neuron_typ -> Optimise.Algodiff.t
Execute the computation in this neuron.
val to_string : neuron_typ -> string
Convert the neuron to its string representation. The string is often a summary of the parameters defined in the neuron.