uoft-cs/cifar10
Viewer โข Updated โข 60k โข 336k โข 142
This is the MLP from Section 1.4.2, trained on the true labels (p = 0). It is one of the two models compared in Section 1.5.
feature_mean and divide by feature_std. Both are stored in model.npz and were computed on the 50,000 images of the CIFAR-10 train part.Class order: 0 airplane, 1 automobile, 2 bird, 3 cat, 4 deer, 5 dog, 6 frog, 7 horse, 8 ship, 9 truck.
uoft-cs/cifar10).| accuracy | CCE loss | |
|---|---|---|
| train (50,000 images) | 0.7697 | 0.6530 |
| test (10,000 images) | 0.4613 | 2.2429 |
model.npz holds:
W0, b0, W1, b1. Every W is stored as (inputs, outputs), so a layer computes h @ W + b.activations (one per layer) and loss.widths, feature_mean, feature_std and preprocessing.import numpy as np
d = np.load("model.npz")
h = (pixels.reshape(-1, 3072) / 255 - d["feature_mean"]) / d["feature_std"] # pixels: uint8, shape (n, 32, 32, 3)
h = np.maximum(h @ d["W0"] + d["b0"], 0) # ReLU
logits = h @ d["W1"] + d["b1"]
predicted_class = logits.argmax(axis=1)