How mathangi18/lab-1 works
CM2003 is a NumPy-based image-classification lab: users prepare CIFAR-10 data, train and evaluate classifiers, and study the training/validation workflow. Its runtime includes kNN and linear/Softmax classifiers, a two-layer neural network, reusable layer operations, and optimization utilities. The README describes the learning workflow; source excerpts confirm selected module calls. Unsampled data and feature utilities are included, but their connections are not inferred beyond documented relationships.
Main entry points: linear_classifier.py Linear Classifier · fc_net.py Two-Layer Network · solver.py Training Solver · layer_utils.py Layer Compositions
Components 12
Data and Features
- Dataset Utilities
cm2003/data_utils.py - Image Features
cm2003/features.py
Classifiers
- kNN Classifier
cm2003/classifiers/k_nearest_neighbor.py - Linear Classifier
cm2003/classifiers/linear_classifier.py - Softmax Loss
cm2003/classifiers/softmax.py - Two-Layer Network
cm2003/classifiers/fc_net.py
Training and Evaluation
- Training Solver
cm2003/solver.py - Update Rules
cm2003/optim.py
Network Operations
- Layer Operations
cm2003/layers.py - Layer Compositions
cm2003/layer_utils.py
Other components
- Lab User
- CIFAR-10 Dataset
Connections 11
- Lab User → Dataset Utilities: loads data
README.md - CIFAR-10 Dataset → Dataset Utilities: provides batches
README.md - Lab User → kNN Classifier: trains and predicts
README.md - Lab User → Linear Classifier: trains and predicts
README.md - Lab User → Two-Layer Network: trains network
README.md - Lab User → Image Features: extracts features
- Linear Classifier → Softmax Loss: imports loss
cm2003/classifiers/linear_classifier.py - Training Solver → Update Rules: applies updates
cm2003/solver.py - Two-Layer Network → Layer Compositions: uses compositions
cm2003/classifiers/fc_net.py - Layer Compositions → Layer Operations: calls primitives
cm2003/layer_utils.py - Lab User → Training Solver: trains and evaluates
README.md