TorchLean Trainer Construction #
Public constructors for the unified trainer handle.
Values that can be used as public trainer models.
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]
Public trainer type carrying a model, task, runtime configuration, and seed.