uoft-cs/cifar10
Viewer β’ Updated β’ 60k β’ 298k β’ 139
mlp_p0.npz β weights in the assignment's Model.save_to format: W0, b0, W1, b1 with W of shape (n_in, n_out), plus architecture_json.standardizer.npz β mean, std (3072 values each) used for preprocessing.numpy_M1_selected_1.2.5.npz (+ numpy_M1_standardizer.npz) β the model selected in Task 1.2.5, trained with the from-scratch NumPy library on the stratified 36,000-image split.import numpy as np
f, s = np.load("mlp_p0.npz"), np.load("standardizer.npz")
def forward(x_uint8): # x_uint8: (n, 32, 32, 3)
h = (x_uint8.reshape(len(x_uint8), -1) / 255.0 - s["mean"]) / s["std"]
h = h @ f["W0"] + f["b0"]
h = np.maximum(h, 0) # ReLU
return h @ f["W1"] + f["b1"] # logits