资源算法Pytorch-XNOR-Net

Pytorch-XNOR-Net

2020-02-04 | |  38 |   0 |   0

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

NetworkAccuracySize
LeNet99.50%1.7 MB
Bin_LeNet99.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

NetworkAccuracySize  
VGG1392.40%37.7 MB
Bin_VGG1388.74%1.3 MB
VGG1692.29%59.0 MB
Bin_VGG1687.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


上一篇: Binary-Neural-Network-Keras

下一篇:BinaryNetConvolution

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...