Optimise.Checkpoint
Checkpoint module
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 definition of checkpoint
Batch type.
val init_state : int -> float -> state
init_state batches_per_epoch epochs
initialises a state by specifying the number of batches per epoch and the number of epochs in total.
This function is used for saving intermediate files during optimisation.
val print_state_info : state -> unit
Print out the detail information of current state
.
val print_summary : state -> unit
Print out the summary of current state
.
val run : typ -> (string -> unit) -> int -> Algodiff.t -> state -> unit
Execute the computations defined in module typ
.
val to_string : typ -> string
Convert the module typ
to its string representation.