Module Evaluators #
Reusable no-gradient evaluators over live module state, including scalar-objective evaluation.
A reusable no-gradient evaluator over existing model state.
The evaluator accepts differentiable tensors and non-differentiable data tensors separately. It can therefore run both scalar objectives and tensor-valued forward programs without rebuilding a session for each input batch.
- evaluate : Curried.Fn α inputShapes (Curried.Fn β dataInputShapes (IO (TorchLean.Tensor α outputShape)))
Evaluate one input pack and return the program output.
Instances For
Scalar-output specialization of Evaluator.
Instances For
Apply a reusable evaluator to shape-indexed ordinary and discrete inputs.
Instances For
Create a reusable no-gradient evaluator for an execution-polymorphic program.
The evaluator shares the supplied live parameter objects. Its eager session is reset after every call, so validation and generation do not retain one execution graph per input batch.
Instances For
Create a reusable no-gradient evaluator over an existing live parameter list.
This is useful when two definitions share the same parameter layout but differ in execution mode, for example training and evaluation losses for a model containing dropout. The evaluator shares the parameter objects and their current backend storage with the training module. Its eager session is reset after every call, so repeated validation does not retain one execution graph per batch.