Skip to content

Jackylwl/cs231n

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CS231n: Deep Learning for Computer Vision

Solutions to the three programming assignments from Stanford's CS231n course.

Assignments Overview

Assignment 1 -- Image Classification Fundamentals

Notebook Topics
knn.ipynb k-Nearest Neighbor classifier
svm.ipynb Linear SVM loss and optimization
softmax.ipynb Softmax classifier
two_layer_net.ipynb Two-layer fully connected neural network
features.ipynb Higher-level image features (HOG, color histograms)

Assignment 2 -- Training Neural Networks

Notebook Topics
FullyConnectedNets.ipynb Modular layer design, SGD + momentum, RMSProp, Adam
BatchNormalization.ipynb Batch normalization forward/backward
Dropout.ipynb Dropout regularization
ConvolutionalNetworks.ipynb Convolution, pooling, and spatial batch norm layers
PyTorch.ipynb PyTorch basics -- Tensors, Autograd, nn.Module

Assignment 3 -- Sequence Models, Generative Models & Visualization

Notebook Topics
RNN_Captioning.ipynb Vanilla RNN for image captioning
LSTM_Captioning.ipynb LSTM cells and LSTM-based captioning
Transformer_Captioning.ipynb Multi-head attention and Transformer captioning
Generative_Adversarial_Networks.ipynb GAN training on MNIST
Self_Supervised_Learning.ipynb SimCLR contrastive learning
Network_Visualization.ipynb Saliency maps, fooling images, class visualization

Getting Started

1. Clone the repository

git clone <repo-url>
cd "cs213n assignment"

2. Create a virtual environment (per assignment)

cd assignment2
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt

If no requirements.txt is present, install the common dependencies:

pip install jupyter numpy scipy matplotlib pillow tqdm

For PyTorch notebooks (Assignment 2 & 3), install PyTorch for your platform: pytorch.org/get-started

3. Download datasets

Each assignment has download scripts under cs231n/datasets/. Run them before opening the notebooks:

cd cs231n/datasets
bash get_datasets.sh

4. Launch Jupyter

jupyter notebook

Project Layout

assignment1/
  cs231n/                 # Classifiers, layers, solvers, utils
  *.ipynb                 # Exercise notebooks
assignment2/
  cs231n/                 # Layers, optimizers, fast CNN layers
  *.ipynb
assignment3/
  cs231n/                 # RNN/Transformer layers, GAN, SimCLR, visualization
  *.ipynb

Notes

  • Originally developed and run on Google Colab. Some setup cells reference Google Drive mounts -- adjust or skip them for local execution.
  • Training-heavy notebooks (GANs, SimCLR) benefit significantly from GPU acceleration.

Reference

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors