type state = {
mutable current_batch : int;
mutable batches_per_epoch : int;
mutable epochs : float;
mutable batches : int;
mutable loss : Algodiff.t array;
mutable start_at : float;
mutable stop : bool;
mutable gs : Algodiff.t array array;
mutable ps : Algodiff.t array array;
mutable us : Algodiff.t array array;
mutable ch : Algodiff.t array array array;
}
type typ =
| Batch of int
| Epoch of float
| Custom of state -> unit
| None
val init_state : int -> float -> state
val default_checkpoint_fun : (string -> 'a) -> 'b
val print_state_info : state -> unit
val print_summary : state -> unit
val to_string : typ -> string