This repo contains tutorials covering how to do image classification using PyTorch, TorchVision and TensorBoard using Python 3.7.
If you find any mistakes or disagree with any of the explanations, please do not hesitate to submit an issue. I welcome any feedback, positive or negative!
- Download the GitHub repo by using the following command running from the terminal.
git clone https://github.com/arpanmukherjee/Pytorch-image-classifier-with-Tensorboard
cd Autoencoders-and-more-using-PyTorch/
- Install
pip
from the terminal, for more details please look here. Go to the following project folder and install all the dependencies by running the following command. By running this command, it will install all the dependencies you will require to run the project.
pip install -r requirements.txt
The network can be trained using main.py
script. Currently, it only accepts the following arguments with the allowed values. Please strictly follow the argument name and any of the values.
argument | accepted values | default value |
---|---|---|
epochs | integer | 75 |
batch-size | integer | 16 |
learning-rate | float | 0.001 |
seed | int | 1 |
data-path | data directory | ../dataset/ |
dataset | MNIST or STL10 or CIFAR10 | - |
use_cuda | bool | False |
weight-decay | float | 1e-5 |
log-interval | int | 50 |
save-model | bool | True |
Arguments that have no default value, you must provide value to run the script.
python main.py --dataset STL10 --use-cuda True
If you think the model is taking too much time, you can consider using GPU. Set use_cuda
argument as True
.