← Back to Course Landing Page

Assignment 1 – Foundations of Deep Learning Pipelines and Architectures

From Linear Models to Modern Sequence Models: A Comparative Study for Image Classification

Course: CO3133 Deep Learning and Its Applications  ·  Semester: 261

Instructor: Lê Thành Sách  ·  Group: CR7

Group Members

NameStudent ID
Trần Hoàng Vỹ Khang2352502
Đỗ Đàng Khoa2352554
Dương Đàng Khoa2352551

Milestone Status

MilestoneDueMinimum RequiredState
M1 Draft (25%) 23 Sep 2026 EDA, Dataset/DataLoader, train/val loop, Linear + MLP runnable Complete ✓
M2 Final (75%) 21 Oct 2026 All five models, full comparison, report, slides, video, checkpoints Not started

1. Problem Statement

The goal is to compare neural network architectures (Linear, MLP, CNN, LSTM/GRU, Transformer) on Fashion-MNIST classification and understand how each architectural choice affects performance. Some classes like Trouser or Bag are easy to separate by shape alone, while Shirt/Pullover/Coat/T-shirt share similar silhouettes and need the model to learn texture features — making this a useful benchmark for comparing model capacity.

2. Dataset and EDA

Dataset: Fashion-MNIST (Xiao et al., 2017) — 70,000 grayscale 28×28 images, 10 classes. Full EDA: notebooks/eda.ipynb (executed, outputs saved).

ItemValue
Input shape1 × 28 × 28  (784 features when flattened)
Classes10 — T-shirt/top, Trouser, Pullover, Dress, Coat, Sandal, Shirt, Sneaker, Bag, Ankle boot
Class balancePerfectly balanced; imbalance ratio = 1.0000, normalised entropy = 1.0000
Data split54,000 train / 6,000 val (stratified, seed 42) / 10,000 official test
PreprocessingToTensor + Normalize(mean=0.2860, std=0.3530); no augmentation
Trivial baseline10% (uniform random guess)

Dataset is perfectly balanced, so accuracy ≈ macro-F1 throughout.

3. What We Did for M1

CNN, LSTM/GRU, Transformer — in repo but empty, part of M2 Final.

4. Training Setup

SettingValue
OptimizerAdam, lr = 0.001, weight decay = 0, batch size = 128
Max epochs / early stop15 epochs, stop after 5 with no improvement
Checkpoint metricBest validation macro-F1
Seed42 (random, numpy, torch, torch.cuda)
HardwareNVIDIA RTX 3050 Laptop (4 GB), Windows 11
SoftwarePython 3.13.14, PyTorch 2.14.0+cu130, torchvision 0.29.0+cu130, NumPy 2.5.3, scikit-learn 1.9.1

Test split is never seen during training; evaluated once per model after training.

5. Results (M1 Draft, Fashion-MNIST, seed 42)

Test split is the official 10,000-image held-out set:

ModelParamsTest Acc.Test Macro-F1 Best EpochTrain Time
Linear / Softmax 7,8500.84400.8441 11 / 1587 s
MLP (784→256→10, dropout 0.2) 203,5300.88840.8878 15 / 1591 s

Per-class F1

ClassLinearMLPGain
Shirt0.59990.7035+0.104
Pullover0.73230.8098+0.077
Coat0.74420.8177+0.074
T-shirt/top0.80730.8357+0.028
Dress0.84920.8901+0.041
Sneaker0.92380.9443+0.021
Sandal0.93140.9624+0.031
Bag0.93550.9744+0.039
Ankle boot0.94990.9557+0.006
Trouser0.96720.9840+0.017

MLP gains +4.4 macro-F1 points vs. linear, using 26× more parameters. Most of the gain is on the three hardest upper-body classes (Shirt, Pullover, Coat: avg. +0.085), vs. only +0.023 on the other seven — matches the EDA prediction. MLP stopped at epoch 15/15 with F1 still rising, so 0.8878 is a lower bound.

Train time is unreliable for speed comparison (num_workers=0, bottleneck is the data loader).

Links