cifar10-iocnn-384-128 (IOC-NN, CIFAR-10, clean labels p = 0)
Architecture
- Input: 3072 (32x32x3 image, flattened, HWC order as loaded from
uoft-cs/cifar10) - Layers: 3072 -> 384 -> 128 -> 10 (raw logits; use softmax / CrossEntropyLoss outside the model)
- Parameters: 1,230,602 (layer 1 alone holds 1,179,648 weights, about 95.8% of the total)
- ELU hidden activations. Weights of layers 2+ constrained to be >= 0 (input-output convex: every pre-softmax logit is convex in the input).
- Initialisation: Layer 1 copied from the MLP's initial layer 1; layers 2+ ~ U(0, 2/n_in); biases 0. After each SGD step, any negative weight w in layers 2+ is replaced by exp(w - 5).
Preprocessing (must be applied to inputs)
- Flatten each 32x32x3 uint8 image to a 3072-vector.
- Divide by 255 (float32).
- Standardise per feature:
(x - mean) / std, where mean/std are computed on the 50,000 CIFAR-10 training images only (std of 0 replaced by 1). The statistics are inpreprocessing_stats.safetensors(keysmean,std, each shape (3072,));preprocess.pyimplements the pipeline.
Training
- Data: official CIFAR-10 train (50,000) / test (10,000) split, true labels (p = 0)
- SGD, lr 0.05, no momentum, batch 64, 100 epochs, cross-entropy loss
- Seeds (roll-number based): torch init seed + 1, batch-shuffle generator seed + 2
Results (test set, final epoch)
- Test accuracy: 48.24% | Train accuracy: 87.02%
- Test loss: 3.2850 | Macro F1: 0.4848
Usage
import torch, numpy as np
from safetensors.torch import load_model
from modeling import IOCNN as Net
from preprocess import preprocess
model = Net(); load_model(model, "model.safetensors"); model.eval()
logits = model(torch.tensor(preprocess(images_uint8))) # images_uint8: (N, 32, 32, 3)
Class order: 0=plane, 1=auto, 2=bird, 3=cat, 4=deer, 5=dog, 6=frog, 7=horse, 8=ship, 9=truck.