Autograd.Vector
Vectors.
type nonrec t = t array
A vector.
val init : int -> (int -> t) -> t
val dim : t -> int
Dimension of a vector.
val map : (t -> t) -> t -> t
Apply a function on every coefficient.
val subvector : t -> int -> int -> t
Subvector.
val to_scalar : t -> t
val hadamard : t -> t -> t
Hadamard product.
val sum : t -> t
Sum of the components of a vector.
val dot : t -> t -> t
Dot product of vectors.
val cmul : t -> t -> t
Mutiplication by a constant.
val soft_max : t -> t
Soft max function.
val rms_norm : t -> t
RMS norm.
val add : t -> t -> t
Vector addition.