Giter Club home page Giter Club logo

pytorch-xnor-net's Introduction

Pytorch-XNOR-Net

Build

cd <Repository Root>/csrc/binop
make

MNIST

Usage

Train:

cd <Repository Root>/MNIST/
python3 main.py --arch Bin_LeNet
python3 main.py --arch LeNet

Evaluate:

cd <Repository Root>/MNIST/
python3 main.py --arch Bin_LeNet --evaluate --pretrained ./models/Bin_LeNet.best.pth # --no_cuda (Use CPU)
python3 main.py --arch LeNet --evaluate --pretrained ./models/LeNet.best.pth # --no_cuda (Use CPU)

Result

Network Accuracy Size
LeNet 99.50% 1.7 MB
Bin_LeNet 99.45% 102 KB

Cifar10

Usage

Train:

cd <Repository Root>/Cifar10/
python3 main.py --arch Bin_VGG16 #(11, 13, 16, 19)
python3 main.py --arch VGG16 #(11, 13, 16, 19)

Evaluate:

cd <Repository Root>/Cifar10/
python3 main.py --arch Bin_VGG16 --evaluate --pretrained ./models/Bin_VGG16.best.pth # --no_cuda (Use CPU)
python3 main.py --arch VGG16 --evaluate --pretrained ./models/VGG16.best.pth # --no_cuda (Use CPU)

Result

Network Accuracy Size ย 
VGG13 92.40% 37.7 MB
Bin_VGG13 88.74% 1.3 MB
VGG16 92.29% 59.0 MB
Bin_VGG16 87.78% 2.0 MB

Pre-trained models

Google Drive

Environment

Software

  • Ubuntu 16.04
  • Python 3.5
  • Pytorch 0.3.1
  • CUDA 8.0
  • gcc 5.4

Hardware

  • NVIDIA GTX 1080
  • Intel i5-6500 CPU @ 3.20GHz ร— 4

Reference

pytorch-xnor-net's People

Contributors

cooooorn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.