Neuron.Normalisationtype neuron_typ = {mutable axis : int;mutable beta : Optimise.Algodiff.t;mutable gamma : Optimise.Algodiff.t;mutable mu : Optimise.Algodiff.t;mutable var : Optimise.Algodiff.t;mutable decay : Optimise.Algodiff.t;mutable training : bool;mutable in_shape : int array;mutable out_shape : int array;}Neuron type definition.
val create :
?training:bool ->
?decay:float ->
?mu:Optimise.Algodiff.A.arr ->
?var:Optimise.Algodiff.A.arr ->
int ->
neuron_typCreate the neuron. Note that axis 0 is the batch axis.
val connect : int array -> neuron_typ -> unitConnect this neuron to others in a neural network.
val init : neuron_typ -> unitInitialise the neuron and its parameters.
val reset : neuron_typ -> unitReset the parameters in a neuron.
val mktag : int -> neuron_typ -> unitTag the neuron, used by Algodiff module.
val mkpar : neuron_typ -> Optimise.Algodiff.t arrayAssemble all the trainable parameters in an array, used by Optimise module.
val mkpri : neuron_typ -> Optimise.Algodiff.t arrayAssemble all the primial values in an array, used by Optimise module.
val mkadj : neuron_typ -> Optimise.Algodiff.t arrayAssemble all the adjacent values in an array, used by Optimise module.
val update : neuron_typ -> Optimise.Algodiff.t array -> unitUpdate trainable parameters of the neuron, used by Optimise module.
val load_weights : neuron_typ -> Optimise.Algodiff.t array -> unitLoad both trainable and non-trainable parameters into the neuron.
val save_weights : neuron_typ -> Optimise.Algodiff.t arrayAssemble both trainable and non-trainable parameters of the neuron.
val copy : neuron_typ -> neuron_typMake a deep copy of the neuron and its parameters.
val run : Optimise.Algodiff.t -> neuron_typ -> Optimise.Algodiff.tExecute the computation in this neuron.
val to_string : neuron_typ -> stringConvert the neuron to its string representation. The string is often a summary of the parameters defined in the neuron.