Skip to content

potterhsu/CIFAR10Classifier-PyTorch

Repository files navigation

CIFAR10Classifier-PyTorch

Implementation of CIFAR-10 classifier with PyTorch

Requirements

  • Python 2.7
  • PyTorch
  • LMDB
  • Visdom

Usage

  1. Convert to LMDB format

    $ python convert_to_lmdb.py --data_dir ../data
    
  2. (Optional) Test for reading LMDBs

    Open read_lmdb_sample.ipynb in Jupyter

  3. Train

    $ python train.py --data_dir ../data --logdir ./logs
    
  4. Retrain if you need

    $ python train.py --data_dir ./data --logdir ./logs_retrain --restore_checkpoint ./logs/model-100.tar
    
  5. Evaluate

    $ python eval.py --data_dir ../data ./logs/model-100.tar
    
  6. Visualize

    $ python -m visdom.server
    $ python visualize.py --logdir ./logs
    
  7. (Optional) Try to make an inference

    Open inference_sample.ipynb in Jupyter

  8. Clean

    $ rm -rf ./logs
    or
    $ rm -rf ./logs_retrain
    

About

Implementation of CIFAR-10 classifier with PyTorch

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published