AutogradAutomatic differentiation and backward propagation.
type t = {mutable value : float;scalar value of this node calculated during forward pass
*)mutable grad : float;derivative of the loss w.r.t. this node, calculated in backward pass
*)children : t list;children of this node in the computation graph
*)local_grads : float list;local derivative of this node w.r.t. its children
*)mutable visited : bool;whether the value was already visited during backprop
*)}A value that can be backpropagated.
val value : t -> floatGet value.
val grad : t -> floatGet gradient.
val const : float -> tConstant value.
val backward : t -> unitPerform backward propagation.
module Infix : sig ... endInfix notations.
module Vector : sig ... endVectors.
module Matrix : sig ... endMatrices.