CNN Training Example #
Runnable torchlean cnn example. It trains a small convolutional classifier on a prepared CIFAR-10
minibatch.
The reusable model wiring lives behind the public TorchLean.nn.models.CNN constructor. The command
adds the pieces around it: CLI parsing, dataset selection, step-limited loader training, and TrainLog
artifact writing.
python3 scripts/datasets/download_example_data.py --cifar10
lake build -R -K cuda=true && lake exe torchlean cnn --cuda --n-total 1 --steps 1
CLI subcommand name used in terminal banners and parser errors.
Instances For
Default JSON loss-curve path for this command.
Instances For
Static minibatch size for the compact CIFAR run.
The model owns the batch axis, so this value appears in both the input/output shapes and the classifier trainer type.
Instances For
Height of the CIFAR crop used by this runnable CNN command.
Instances For
Width of the CIFAR crop used by this runnable CNN command.
Instances For
CIFAR class count, hence the output-logit width.
Instances For
Shared CNN configuration used by shapes and the reusable public model constructor.
Instances For
Input shape: a minibatch of CIFAR images in channel-first layout.
Instances For
Output shape: one row of class logits per image.
Instances For
Small convolutional classifier from the public model API.
The command chooses the CIFAR paths and runtime flags; the model itself stays an ordinary
nn.Sequential value built from the public API.
Instances For
Train the CIFAR CNN with the public Trainer surface.