Skip to content

Commit 7c4389a

Browse files
author
Yash Srivastava
authored
Create README.md
1 parent dba4500 commit 7c4389a

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

Assignment-2/Q4/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Question 4 - Assignment 2
2+
3+
**About the Code**
4+
5+
Finetuning AlexNet's last classifier layer where the classes are reduced from 1000 to the number of classes in dataset(8).
6+
7+
**Installing Dependencies**
8+
9+
1. Install PyTorch by following the instructions given on the link [here](http://pytorch.org/).
10+
2. Run ```pip3 install torchvision tensorflow==1.4 tensorboardX``` in command line.
11+
12+
**Running the Code**
13+
14+
1. First, get the dataset in two folders: train and test by modifying paths in [data_process.py](https://github.com/radonys/CV-Assignments/blob/master/Assignment-2/Q3/data_process.py).
15+
Then, execute the command ```python3 data_process.py```.
16+
2. Then modify the dataset path in [alexnet.py](https://github.com/radonys/CV-Assignments/blob/master/Assignment-2/Q3/alexnet.py), where the newly created folders are saved.
17+
3. Then run ```python3 alexnet.py```.
18+
19+
**Visualizing the Results**
20+
21+
To visualize the current results, open a terminal session, and run the following command:
22+
```tensorboard --logdir runs```
23+
24+
**Obtained Results**
25+
26+
1. Training Accuracy = **92.69%**
27+
2. Training Loss = **0.27**
28+
3. Testing Accuracy = **92.5**
29+
30+
**Graphs**
31+
32+
![Train Accuracy](https://github.com/radonys/CV-Assignments/blob/master/Assignment-2/Q3/trainacc.png "Train Accuracy")
33+
![Train Loss](https://github.com/radonys/CV-Assignments/blob/master/Assignment-2/Q3/trainloss.png "Train Loss")
34+
![Test Accuracy](https://github.com/radonys/CV-Assignments/blob/master/Assignment-2/Q3/testacc.png "Test Accuracy")

0 commit comments

Comments
 (0)