This repo contains a collection of CNN network structures.
For each kind of CNN network, we provide a pytorch implementation, a caffe implementation for NetScope visualization, and additional pictures(mostly from original paper) to help you understand how it works. Links to original paper and my notes(in Chinese) are also provided.
Furthermore, in experiments folder, there is a training script for you to train each kind of network with Pytorch on dataset CIFAR-10.
1.Clone this repo.
git clone https://github.com/ddlee96/awesome_cnn.git
2.Install PyTorch and TorchVision following instructions on PyTorch website.
(Optional)Install dependencies using pipenv:
pip install pipenv
cd awesome_cnn
pipenv install
pipenv will install dependencies based on Pipfile. You can also modify this Pipfile to match your environment.
3.Prepare dataset
cd awesome_cnn
mkdir data
Then just run python experiments/experiment.py --data cifar
, it will create data/cifar/
and download cifar-10 dataset for you.
(Optional)You can also use dataset MNIST and [Fashion-MNIST](), it requires Pillow package. Install it using pip install Pillow
.
4.Start Training
python experiments/experiment.py --model resnet50 --data cifar --batch_size 182 --gpus 0,1,2,3
It will train model ResNet50 on cifar10 with batch size 128. More options can be find in experiment.py
.