Minibatch MLP training (batching is implicit) #
This next-step file shows the intended "PyTorch-like" minibatch path in TorchLean:
- Keep the dataset per-sample (
x : Vec inDim,y : Vec outDim). - Use
Data.batchLoaderto collate minibatches. - Write the model and task over the minibatch shape (
batch × Vec inDim). - Train one step per minibatch.
Run the loader tutorial instead when possible:
lake exe torchlean data_csv --epochs 1 --batch 5 --dtype float --backend eager
Build this comparison module directly with:
lake build NN.Examples.Quickstart.MinibatchMlpTrain
Optional flags (tutorial-specific):
--data-dir PATH(default:NN/Examples/Data)--csv PATH(override the CSV file)--seed S--batch N--epochs E
Batched MLP 2 -> 8 -> 1.
Instances For
def
NN.Examples.Quickstart.MinibatchMLPTrain.loadDataset
(csvPath : System.FilePath)
{α : Type}
[API.Semantics.Scalar α]
[API.Runtime.Scalar α]
: