Skip to content

Commit 4fb9de4

Browse files
committed
Add 2022 a1
1 parent e0c439d commit 4fb9de4

File tree

4 files changed

+115
-4
lines changed

4 files changed

+115
-4
lines changed

_config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ kramdown:
1919
syntax_highlighter: rouge
2020

2121
# links to homeworks
22-
hw_1_colab: https://cs231n.github.io/assignments/2021/assignment1_colab.zip
23-
hw_2_colab: https://cs231n.github.io/assignments/2021/assignment2_colab.zip
24-
hw_3_colab: https://cs231n.github.io/assignments/2021/assignment3_colab.zip
22+
hw_1_colab: https://cs231n.github.io/assignments/2022/assignment1_colab.zip
23+
hw_2_colab: https://cs231n.github.io/assignments/2022/assignment2_colab.zip
24+
hw_3_colab: https://cs231n.github.io/assignments/2022/assignment3_colab.zip

assignments/2022/assignment1.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
layout: page
3+
title: Assignment 1
4+
mathjax: true
5+
permalink: /assignments2022/assignment1/
6+
---
7+
8+
<span style="color:red">This assignment is due on **Friday, April 15 2022** at 11:59pm PST.</span>
9+
10+
Starter code containing Colab notebooks can be [downloaded here]({{site.hw_1_colab}}).
11+
12+
- [Setup](#setup)
13+
- [Goals](#goals)
14+
- [Q1: k-Nearest Neighbor classifier](#q1-k-nearest-neighbor-classifier)
15+
- [Q2: Training a Support Vector Machine](#q2-training-a-support-vector-machine)
16+
- [Q3: Implement a Softmax classifier](#q3-implement-a-softmax-classifier)
17+
- [Q4: Two-Layer Neural Network](#q4-two-layer-neural-network)
18+
- [Q5: Higher Level Representations: Image Features](#q5-higher-level-representations-image-features)
19+
- [Submitting your work](#submitting-your-work)
20+
21+
### Setup
22+
23+
Please familiarize yourself with the [recommended workflow]({{site.baseurl}}/setup-instructions/#working-remotely-on-google-colaboratory) before starting the assignment. You should also watch the Colab walkthrough tutorial below.
24+
25+
<iframe style="display: block; margin: auto;" width="560" height="315" src="https://www.youtube.com/embed/IZUz4pRYlus" frameborder="0" allowfullscreen></iframe>
26+
27+
**Note**. Ensure you are periodically saving your notebook (`File -> Save`) so that you don't lose your progress if you step away from the assignment and the Colab VM disconnects.
28+
29+
Once you have completed all Colab notebooks **except `collect_submission.ipynb`**, proceed to the [submission instructions](#submitting-your-work).
30+
31+
### Goals
32+
33+
In this assignment you will practice putting together a simple image classification pipeline based on the k-Nearest Neighbor or the SVM/Softmax classifier. The goals of this assignment are as follows:
34+
35+
- Understand the basic **Image Classification pipeline** and the data-driven approach (train/predict stages).
36+
- Understand the train/val/test **splits** and the use of validation data for **hyperparameter tuning**.
37+
- Develop proficiency in writing efficient **vectorized** code with numpy.
38+
- Implement and apply a k-Nearest Neighbor (**kNN**) classifier.
39+
- Implement and apply a Multiclass Support Vector Machine (**SVM**) classifier.
40+
- Implement and apply a **Softmax** classifier.
41+
- Implement and apply a **Two layer neural network** classifier.
42+
- Understand the differences and tradeoffs between these classifiers.
43+
- Get a basic understanding of performance improvements from using **higher-level representations** as opposed to raw pixels, e.g. color histograms, Histogram of Gradient (HOG) features, etc.
44+
45+
### Download data:
46+
Once you have the starter code, you will need to download the CIFAR-10 dataset.
47+
Run the following from the `assignment1` directory:
48+
49+
```bash
50+
cd cs231n/datasets
51+
./get_datasets.sh
52+
```
53+
54+
### Q1: k-Nearest Neighbor classifier
55+
56+
The notebook **knn.ipynb** will walk you through implementing the kNN classifier.
57+
58+
### Q2: Training a Support Vector Machine
59+
60+
The notebook **svm.ipynb** will walk you through implementing the SVM classifier.
61+
62+
### Q3: Implement a Softmax classifier
63+
64+
The notebook **softmax.ipynb** will walk you through implementing the Softmax classifier.
65+
66+
### Q4: Two-Layer Neural Network
67+
68+
The notebook **two\_layer\_net.ipynb** will walk you through the implementation of a two-layer neural network classifier.
69+
70+
### Q5: Higher Level Representations: Image Features
71+
72+
The notebook **features.ipynb** will examine the improvements gained by using higher-level representations
73+
as opposed to using raw pixel values.
74+
75+
### Submitting your work
76+
77+
**Important**. Please make sure that the submitted notebooks have been run and the cell outputs are visible.
78+
79+
Once you have completed all notebooks and filled out the necessary code, you need to follow the below instructions to submit your work:
80+
81+
**1.** Open `collect_submission.ipynb` in Colab and execute the notebook cells.
82+
83+
This notebook/script will:
84+
85+
* Generate a zip file of your code (`.py` and `.ipynb`) called `a1.zip`.
86+
* Convert all notebooks into a single PDF file.
87+
88+
If your submission for this step was successful, you should see the following display message:
89+
90+
`### Done! Please submit a1.zip and the pdfs to Gradescope. ###`
91+
92+
**2.** Submit the PDF and the zip file to [Gradescope](https://www.gradescope.com/courses/379571).
93+
94+
Remember to download `a1.zip` and `assignment.pdf` locally before submitting to Gradescope.
56.7 KB
Binary file not shown.

index.html

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,23 @@
1313

1414
<div class="home">
1515
<div class="materials-wrap">
16+
<div class="module-header">Spring 2022 Assignments</div>
17+
<div class="materials-item">
18+
<a href="assignments2022/assignment1/">Assignment #1: Image Classification, kNN, SVM, Softmax, Fully Connected Neural Network</a>
19+
</div>
20+
<div class="materials-item">
21+
(To be released) Assignment #2: Fully Connected and Convolutional Nets, Batch Normalization, Dropout, Frameworks
22+
<!-- <a href="assignments2022/assignment2/">Assignment #2: Fully Connected and Convolutional Nets, Batch Normalization, Dropout, Frameworks</a> -->
23+
</div>
24+
<div class="materials-item">
25+
(To be released) Assignment #3: Image Captioning with RNNs and Transformers, Network Visualization,
26+
Generative Adversarial Networks, Self-Supervised Contrastive Learning
27+
<!-- <a href="assignments2022/assignment3/">Assignment #3: Image Captioning with RNNs and Transformers, Network Visualization,
28+
Generative Adversarial Networks, Self-Supervised Contrastive Learning</a> -->
29+
</div>
30+
</div>
31+
32+
<!-- <div class="materials-wrap">
1633
<div class="module-header">Spring 2021 Assignments</div>
1734
<div class="materials-item">
1835
<a href="assignments2021/assignment1/">Assignment #1: Image Classification, kNN, SVM, Softmax, Fully Connected Neural Network</a>
@@ -24,7 +41,7 @@
2441
<a href="assignments2021/assignment3/">Assignment #3: Image Captioning with RNNs and Transformers, Network Visualization,
2542
Generative Adversarial Networks, Self-Supervised Contrastive Learning</a>
2643
</div>
27-
</div>
44+
</div> -->
2845
<!--
2946
<div class="materials-item">
3047
<a href="assignments2019/assignment2/">

0 commit comments

Comments
 (0)