Data API¶
MNIST¶
The loader downloads the four standard MNIST archives on first use, caches
them, normalizes images to float32, and returns flattened 784-value samples.
load_mnist ¶
Load MNIST, downloading if not already cached.
Returns¶
(x_train, y_train), (x_test, y_test) x : float32 ndarray of shape (N, 784), values in [0, 1] y : int32 ndarray of shape (N,), values in 0–9
Source code in MiniTorch/data/mnist.py
DataLoader¶
DataLoader yields NumPy feature and label arrays. Wrap features in a
Variable when using eager autograd.