TorchLean API

NN.Examples.Models.Vision.Resnet

ResNet Real-Data Example #

Runnable torchlean resnet example. It trains a compact ResNet-style classifier built from API.nn.resnetBasicBlock on a prepared CIFAR-10 minibatch.

The reusable model wiring lives in NN.API.Models.Resnet (nn.models.resnet). This file is the runnable wrapper (CIFAR loader construction + multi-epoch training loop).

python3 scripts/datasets/download_example_data.py --cifar10
lake build -R -K cuda=true && lake exe torchlean resnet --cuda --n-total 200 --steps 1

Tip: the defaults are set for a quick sanity run. For a longer run:

lake build -R -K cuda=true
lake exe torchlean resnet --cuda --fast-kernels --n-total 5000 --steps 200
@[reducible, inline]
Instances For
    @[reducible, inline]
    Instances For