You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<palign="center"><b>Convolutional Neural Networks for Visual Recognition</b></p>
3
-
<palign="center"><i>Stanford - Spring 2021</i></p>
3
+
<palign="center"><i>Stanford - Spring 2021-2023</i></p>
4
4
5
5
## About
6
6
### Overview
7
-
These are my solutions for the **CS231n** course assignments offered by Stanford University (Spring 2021). Solutions work for further years like 2022. Inline questions are explained in detail, the code is brief and commented (see examples below). From what I investigated, these should be the shortest code solutions (excluding open-ended challenges). In assignment 2, _DenseNet_ is used in _PyTorch_ notebook and _ResNet_ in _TensorFlow_ notebook.
7
+
These are my solutions for the **CS231n** course assignments offered by Stanford University (Spring 2021). Solutions work for further years like 2022, 2023. Inline questions are explained in detail, the code is brief and commented (see examples below). From what I investigated, these should be the shortest code solutions (excluding open-ended challenges). In assignment 2, _DenseNet_ is used in _PyTorch_ notebook and _ResNet_ in _TensorFlow_ notebook.
8
8
9
-
> Check out the solutions for **[CS224n](https://github.com/mantasu/cs224n)**. From what I checked, they contain more comprehensive explanations than others.
9
+
> Check out the solutions for **[CS224n](https://github.com/mantasu/cs224n)**. They contain more comprehensive explanations than others.
@@ -42,7 +42,33 @@ These are my solutions for the **CS231n** course assignments offered by Stanford
42
42
43
43
<br>
44
44
45
+
## Running Locally
46
+
47
+
It is advised to run in [Colab](https://colab.research.google.com/), however, you can also run locally. To do so, first, set up your environment - either through [conda](https://docs.conda.io/en/latest/) or [venv](https://docs.python.org/3/library/venv.html). It is advised to install [PyTorch](https://pytorch.org/get-started/locally/) in advance with GPU acceleration. Then, follow the steps:
48
+
1. Install the required packages:
49
+
```bash
50
+
pip install -r requirements.txt
51
+
```
52
+
2. Change every first code cell in `.ipynb` files to:
53
+
```bash
54
+
%cd cs231n/datasets/
55
+
!bash get_datasets.sh
56
+
%cd ../../
57
+
```
58
+
3. Change the first code cell in section **Fast Layers** in [ConvolutionalNetworks.ipynb](assignment2/ConvolutionalNetworks.ipynb) to:
59
+
```bash
60
+
%cd cs231n
61
+
!python setup.py build_ext --inplace
62
+
%cd ..
63
+
```
64
+
65
+
I've gathered all the requirements for all 3 assignments into one file [requirements.txt](requirements.txt) so there is no need to additionally install the requirements specified under each assignment folder. If you plan to complete [TensorFlow.ipynb](assignment2/TensorFlow.ipynb), then you also need to additionally install [Tensorflow](https://www.tensorflow.org/install).
66
+
67
+
68
+
> **Note**: to use MPS acceleration via Apple M1, see the comment in [#4](https://github.com/mantasu/cs231n/issues/4#issuecomment-1492202538).
0 commit comments