# CS231n: CNNs for Visual Recognition

> Stanford's foundational course on deep learning for computer vision

- Type: Misc
- By: Stanford
- Year: 2015
- Topics: Deep learning, CNNs, Vision, Course
- Page: https://aipedia.org/cs231n

## Resources

- [CS231n: Deep Learning for Computer Vision](https://cs231n.stanford.edu/): Course, Stanford University
- [CS231n course notes](https://cs231n.github.io/): Article, Written guides
- [Lecture videos (Spring 2017)](https://www.youtube.com/playlist?list=PL3FW7Lu3i5JvHM8ljYj-zLfQRF3EO8sYv): Video, Full lecture series

**CS231n** is Stanford's renowned course on Convolutional Neural Networks for Visual Recognition. It builds deep learning up from first principles — starting with basic classifiers, working through neural networks and [backpropagation](https://aipedia.org/backpropagation), and ending at state-of-the-art architectures.

> This page is about a **course**, not a paper or an architecture. If you want a specific architecture, jump straight to [AlexNet](https://aipedia.org/alexnet) or [ResNet](https://aipedia.org/resnet).

## Why Students Should Care

- CS231n is arguably the most popular on-ramp into deep learning: lectures, notes, and assignments are all **free online**.
- It teaches the skill frameworks hide from you — implementing [backpropagation](https://aipedia.org/backpropagation) by hand — which pays off every time you debug a model.
- Its syllabus doubles as a reading map for this wiki: many pages here ([AlexNet](https://aipedia.org/alexnet), [ResNet](https://aipedia.org/resnet), [Dropout](https://aipedia.org/dropout), [GAN](https://aipedia.org/gan)) are covered in the course.

## Course Philosophy

The course emphasizes:

1. **First principles understanding** — implementing backpropagation from scratch
2. **Mathematical foundations** — understanding why techniques work, not just how
3. **Practical experience** — hands-on assignments with real datasets

## Core Topics

### Image Classification Pipeline

The course starts with the fundamental task: mapping pixels to categories. In plain English, a classifier is a function that takes an image (a grid of numbers) and outputs one of $K$ labels:

$$
f: \mathbb{R}^{H \times W \times C} \rightarrow \{1, 2, ..., K\}
$$

Students implement k-NN, linear classifiers, and loss functions before touching a neural network — so that when networks arrive, they feel like a natural upgrade rather than magic.

### Backpropagation

The heart of deep learning: computing gradients through computational graphs by chaining local derivatives.

$$
\frac{\partial L}{\partial w} = \frac{\partial L}{\partial y} \cdot \frac{\partial y}{\partial w}
$$

That is just the chain rule — but implementing it from scratch, gate by gate, builds intuition that frameworks like PyTorch abstract away. See [Backpropagation](https://aipedia.org/backpropagation) for the full treatment.

### CNN Architectures

The course walks through the landmark architectures in order:

- **LeNet** → **[AlexNet](https://aipedia.org/alexnet)** → **VGG** → **GoogLeNet** → **[ResNet](https://aipedia.org/resnet)**

Each step introduces a key concept: depth, skip connections, inception modules. Reading them in sequence shows *why* each idea was invented, not just what it is.

## Interactive Overview

Explore the course structure and key concepts:

*Interactive demo: https://aipedia.org/cs231n*

## Key Assignments

| Assignment | Skills Developed |
|-----------|------------------|
| k-NN & SVM | Vectorized numpy, loss functions |
| Neural Networks | Backprop, modular design |
| CNNs | Conv layers, architectures |
| RNNs & Attention | Sequence modeling |
| GANs | Generative modeling |

## Common Confusion

- **CS231n is a course, not a model or a paper.** Citing "CS231n" means citing teaching material, not a research result.
- **The website vs. the notes:** cs231n.stanford.edu is the official course page; cs231n.github.io hosts the written lecture notes. Both are freely accessible.
- **CNNs vs. deep learning in general:** the course focuses on *vision*. For sequences and language, see [Understanding LSTMs](https://aipedia.org/understanding-lstms) or [Transformer](https://aipedia.org/transformer).

## Where To Go Next

- Read [Backpropagation](https://aipedia.org/backpropagation) for the algorithm at the heart of the course
- Read [AlexNet](https://aipedia.org/alexnet) and [ResNet](https://aipedia.org/resnet) for the landmark architectures it covers
- Read [Dropout](https://aipedia.org/dropout) for the regularization technique used throughout the assignments
- Read [GAN](https://aipedia.org/gan) for the generative modeling covered in the final assignment

## Key Insight

CS231n's lasting value isn't specific architectures — it's building intuition for how neural networks learn hierarchical representations from data.
