Net.VectorOperations on vectors.
include sig ... endmodule Var : sig ... endval var : Algebra.Vector.t Stdlib.ref -> Algebra.Vector.t tval dup :
?label:string ->
int ->
Algebra.Vector.t t ->
Algebra.Vector.t * (Algebra.Vector.t -> unit)Make a value useable exactly n times.
val drop : Algebra.Vector.t t -> unitShould be called when a vector is not used.
val repeat :
int ->
Algebra.Vector.t t ->
(Algebra.Vector.t * (Algebra.Vector.t -> unit)) arrayMake n explicit copies of x
val demux :
Algebra.Vector.t array t ->
(Algebra.Vector.t * (Algebra.Vector.t -> unit)) arrayval drop_pair : (Algebra.Vector.t * Algebra.Vector.t) t -> unitDrop a pair of vectors.
val to_scalar : Algebra.Vector.t t -> float tval cadd : float -> Algebra.Vector.t t -> Algebra.Vector.t tAdd a constant.
val cmul : float -> Algebra.Vector.t t -> Algebra.Vector.t tMultiply by a constant.
val add : Algebra.Vector.t t -> Algebra.Vector.t t -> Algebra.Vector.t tAdd two vectors.
val hadamard : Algebra.Vector.t t -> Algebra.Vector.t t -> Algebra.Vector.t tHadamard product of two vectors.
val squared_norm : Algebra.Vector.t t -> float tSquared norm.
val squared_distance_to : Algebra.Vector.t -> Algebra.Vector.t t -> float tSquared distance to fixed vector.
val bias :
Algebra.Vector.t Stdlib.ref ->
Algebra.Vector.t t ->
Algebra.Vector.t tAdd a bias vector which can be optimized.
val affine :
Algebra.Matrix.t t ->
Algebra.Vector.t Stdlib.ref ->
Algebra.Vector.t t ->
Algebra.Vector.t tAffine layer.
val sigmoid : Algebra.Vector.t t -> Algebra.Vector.t tSigmoid layer.
val tanh : Algebra.Vector.t t -> Algebra.Vector.t tval relu : Algebra.Vector.t t -> Algebra.Vector.t tRectified linear unit.
val log : Algebra.Vector.t t -> Algebra.Vector.t tLog.
val dot : Algebra.Vector.t t -> Algebra.Vector.t t -> float tDot
val sum : Algebra.Vector.t t -> float tSum
val cross_entropy : Algebra.Vector.t -> Algebra.Vector.t t -> float tCross-entropy
val activation :
[< `None | `ReLU | `Sigmoid | `Tanh ] ->
Algebra.Vector.t t ->
Algebra.Vector.t tval bias_fun :
Algebra.Vector.t Stdlib.ref ->
Algebra.Vector.t t ->
Algebra.Vector.t tval activation_fun :
[< `None | `ReLU | `Sigmoid | `Tanh ] ->
Algebra.Vector.t t ->
Algebra.Vector.t tval neural_network :
?activation:[< `None | `ReLU | `Sigmoid | `Tanh Sigmoid ] ->
weights:Algebra.Linear.t Stdlib.ref ->
?bias:Algebra.Vector.t Stdlib.ref ->
Algebra.Vector.t t ->
Algebra.Vector.t tNeural network layer.
module RNN : sig ... endRecurrent neural network.