Trainer Construction #
Constructors for the trainer handle.
Values accepted by Trainer.new.
This class lets Trainer.new accept either a seedable model builder or an already-built checked
model:
Trainer.new modelBuilder ...
Trainer.new alreadyBuiltModel ...
The seed is consumed only by the builder case. Already-built models pass through unchanged.
- build : ℕ → model → nn.Sequential σ τ
Materialize the model, using the seed only when the value still needs initialization.
Instances
@[implicit_reducible]
@[implicit_reducible]
instance
TorchLean.Trainer.instToModelMSequential
{σ τ : Shape}
:
ToModel (nn.M (nn.Sequential σ τ)) σ τ
@[reducible, inline]
Trainer type carrying a model, task, runtime configuration, and seed.