Small Band-Image Dataset (4×4) #
Several TorchLean tutorials use a compact 4×4 image classification task:
- class
0: a vertical band - class
1: a horizontal band
This module packages that synthetic dataset in one place so examples can stay focused on models and training rather than data-loading infrastructure.
Class Spec #
Canonical label set for the band dataset: vertical ↦ 0, horizontal ↦ 1.
Instances For
Typed Tensors (Tensor-First) #
@[reducible, inline]
Canonical image shape for the band dataset (single-channel 4×4).
Instances For
Training set samples: a small list of (x, label) pairs.
Instances For
Probe set for reporting: (name, x, expectedLabel) triples.
Instances For
def
NN.API.Samples.Bands.trainCHW
{α : Type}
[Context α]
(cast : Float → α)
:
List (Spec.Tensor α shape × ℕ)
Cast trainCHWFloat into an arbitrary scalar backend α.
Instances For
def
NN.API.Samples.Bands.probesCHW
{α : Type}
[Context α]
(cast : Float → α)
(probes : List (String × Spec.Tensor Float shape × ℕ) := probesCHWFloat)
:
Cast probesCHWFloat into an arbitrary scalar backend α.