• Stars
    star
    159
  • Rank 234,581 (Top 5 %)
  • Language
    Jupyter Notebook
  • Created over 4 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This repository contains my solutions to the assignments for Stanford's CS231n "Convolutional Neural Networks for Visual Recognition" (Spring 2020).

CS231n: Convolutional Neural Networks for Visual Recognition - Assignment Solutions

This repository contains my solutions to the assignments for Stanford's CS231n "Convolutional Neural Networks for Visual Recognition" course (Spring 2020).

Stanford's CS231n is one of the best ways to dive into Deep Learning in general, in particular, into Computer Vision. If you plan to excel in another subfield of Deep Learning (say, Natural Language Processing or Reinforcement Learning), we still recommend that you start with CS231n, because it helps build intuition, fundamental understanding and hands-on skills. Beware, the course is very challenging!

To motivate you to work hard, here are actual applications that you'll implement in A3 - Style Transfer and Class Visualization.

For the one on the left, you take a base image and a style image and apply the "style" to the base image (reminds you of Prisma and Artisto, right?). The example on the right is a random image, gradually perturbed in a way that a neural network classifies it more and more confidently as a gorilla. DIY Deep Dream, isn't it? And it's all math under the hood, it's cool to figure out how it all works. You'll get to this understanding with CS231n, it'll be hard but at the same time an exciting journey from a simple kNN implementation to these fascinating applications. If you think that these two applications are eye-catchy, then take another look at the picture above - a Convolutional Neural Network classifying images. That's the basics of how machines can "see" the world. The course will teach you both how to build such an algorithm from scratch and how to use modern tools to run state-of-the-art models for your tasks.

Find course notes and assignments here and be sure to check out the video lectures for Winter 2016 and Spring 2017!

Assignments have been completed using both TensorFlow and PyTorch.

Assignment #1: Image Classification, kNN, SVM, Softmax, Neural Network

Q1: k-Nearest Neighbor Classifier

  • Test accuracy on CIFAR-10: 0.282

Q2: Training a Support Vector Machine

  • Test accuracy on CIFAR-10: 0.376

Q3: Implement a Softmax classifier

  • Test accuracy on CIFAR-10: 0.355

Q4: Two-Layer Neural Network

  • Test accuracy on CIFAR-10: 0.501

Q5: Higher Level Representations: Image Features

  • Test accuracy on CIFAR-10: 0.576

Assignment #2: Fully-Connected Nets, Batch Normalization, Dropout, Convolutional Nets

Q1: Fully-connected Neural Network

  • Validation / test accuracy on CIFAR-10: 0.547 / 0.539

Q2: Batch Normalization

Q3: Dropout

Q4: Convolutional Networks

Q5: PyTorch / TensorFlow v2 on CIFAR-10 / TensorFlow v1 (Tweaked TFv1 model)

  • Training / validation / test accuracy of TF implementation on CIFAR-10: 0.928 / 0.801 / 0.822
  • PyTorch implementation:
Model Training Accuracy Test Accuracy
Base network 92.86 88.90
VGG-16 99.98 93.16
VGG-19 99.98 93.24
ResNet-18 99.99 93.73
ResNet-101 99.99 93.76

Assignment #3: Image Captioning with Vanilla RNNs, Image Captioning with LSTMs, Network Visualization, Style Transfer, Generative Adversarial Networks

Q1: Image Captioning with Vanilla RNNs

Q2: Image Captioning with LSTMs

Q3: Network Visualization: Saliency maps, Class Visualization, and Fooling Images (PyTorch / TensorFlow v2 / TensorFlow v1)

Q4: Style Transfer (PyTorch / TensorFlow v2 / TensorFlow v1)

Q5: Generative Adversarial Networks (PyTorch / TensorFlow v2 / TensorFlow v1)

Course notes

GPUs

For some parts of the 3rd assignment, you'll need GPUs. Kaggle Kernels or Google Colaboratory will do.

Useful links

Direct links to Spring 2017 lectures

Disclaimer

I recognize the hard time people spend on building intuition, understanding new concepts and debugging assignments. The solutions uploaded here are only for reference. They are meant to unblock you if you get stuck somewhere. Please do not copy any part of the solutions as-is (the assignments are fairly easy if you read the instructions carefully).

More Repositories

1

coursera-deep-learning-specialization

Notes, programming assignments and quizzes from all courses within the Coursera Deep Learning specialization offered by deeplearning.ai: (i) Neural Networks and Deep Learning; (ii) Improving Deep Neural Networks: Hyperparameter tuning, Regularization and Optimization; (iii) Structuring Machine Learning Projects; (iv) Convolutional Neural Networks; (v) Sequence Models
Jupyter Notebook
2,975
star
2

coursera-gan-specialization

Programming assignments and quizzes from all courses within the GANs specialization offered by deeplearning.ai
Jupyter Notebook
419
star
3

coursera-machine-learning-engineering-for-prod-mlops-specialization

Programming assignments and quizzes from all courses within the Machine Learning Engineering for Production (MLOps) specialization offered by deeplearning.ai
Jupyter Notebook
415
star
4

iSeeBetter

iSeeBetter: Spatio-Temporal Video Super Resolution using Recurrent-Generative Back-Projection Networks | Python3 | PyTorch | GANs | CNNs | ResNets | RNNs | Published in Springer Journal of Computational Visual Media, September 2020, Tsinghua University Press
C++
358
star
5

coursera-natural-language-processing-specialization

Programming assignments from all courses in the Coursera Natural Language Processing Specialization offered by deeplearning.ai.
Jupyter Notebook
313
star
6

coursera-ai-for-medicine-specialization

Programming assignments, labs and quizzes from all courses in the Coursera AI for Medicine Specialization offered by deeplearning.ai
Jupyter Notebook
255
star
7

stanford-cs224n-assignments-2021

This repository contains my solutions to the assignments for Stanford's CS224n "Natural Language Processing with Deep Learning" (Winter 2021).
Jupyter Notebook
117
star
8

iPerceive

Applying Common-Sense Reasoning to Multi-Modal Dense Video Captioning and Video Question Answering | Python3 | PyTorch | CNNs | Causality | Reasoning | LSTMs | Transformers | Multi-Head Self Attention | Published in IEEE Winter Conference on Applications of Computer Vision (WACV) 2021
Python
75
star
9

FRVSR-GAN

A Novel Approach to Video Super-Resolution using Frame Recurrence and Generative Adversarial Networks | Python3 | PyTorch | OpenCV2 | GANs | CNNs
Python
57
star
10

llm-course

Course on LLMs: Building Personalized Customer Chatbots •
Jupyter Notebook
21
star
11

command-line-interpreter

Unix Shell in C | Support for built-in commands, output redirection, parallel mode, batch mode, consecutive commands etc.
Shell
19
star
12

aman-ai

iPython Notebooks for NumPy and Python Primers
Jupyter Notebook
15
star
13

software-RAID

Software RAID Manager | C | Supports RAID 0, 1, 4, 5 and 10 | Capable of normal mode operation (no failures), working with one failed disk and restoring normal mode with a new disk
C
12
star
14

regex-cheatsheet

RegEx Cheatsheet | Authored by Yours Truly
10
star
15

mle-for-production-mlops

Machine Learning Engineering for Production (MLOps) is an online non-credit specialization authorized by DeepLearning.AI and offered through Coursera
7
star
16

amanchadha

README
5
star
17

melody

Music Player | Python | TkInter | PyGame | Threading | Support for adding/removing songs from a playlist, forward/rewind tracks, mute/unmute functionality
Python
4
star
18

desktop-search-engine-with-pthreads

Desktop Search Engine | Pthreads | Reader/Writer Lock | Fine-grained Bucket-level Locking | C
C
3
star
19

neural-net-from-scratch

Neural network from scratch implementing the XOR function
Python
3
star
20

vim-cheatsheet

Vim Cheatsheet | Authored by Yours Truly
2
star
21

pipelined-processor

Design of a Five-staged Pipelined Processor | Supports Data Hazard Detection, Forwarding, Stalling, Flushing | Testbenches
1
star
22

c-cpp-examples

Random C/C++ examples
C++
1
star
23

calibratable-angle-resolver-in-verilog

Calibratable Angle Resolver | Verilog
Verilog
1
star