资源算法capsnet.mxnet

capsnet.mxnet

2020-03-27 | |  38 |   0 |   0

CapsNet-MXNet

This example is MXNet implementation of CapsNet:
Sara Sabour, Nicholas Frosst, Geoffrey E Hinton. Dynamic Routing Between Capsules. NIPS 2017

  • The current best test error is 0.29% and average test error is 0.303%

  • The average test error on paper is 0.25%

Log files for the error rate are uploaded in repository.


Usage

Install scipy with pip

pip install scipy

Install tensorboard with pip

pip install tensorboard

On Single gpu

python capsulenet.py --devices gpu0

On Multi gpus

python capsulenet.py --devices gpu0,gpu1

Full arguments

python capsulenet.py --batch_size 100 --devices gpu0,gpu1 --num_epoch 100 --lr 0.001 --num_routing 3 --model_prefix capsnet

Prerequisities

MXNet version above (0.11.0)
scipy version above (0.19.0)


Results

Train time takes about 36 seconds for each epoch (batch_size=100, 2 gtx 1080 gpus)

CapsNet classification test error on MNIST

python capsulenet.py --devices gpu0,gpu1 --lr 0.0005 --decay 0.99 --model_prefix lr_0_0005_decay_0_99 --batch_size 100 --num_routing 3 --num_epoch 200

图片.png

TrialEpochtrain err(%)test err(%)train losstest loss
11200.060.310.00560.0064
21670.030.290.00480.0058
31820.040.310.00460.0058
average-0.0430.3030.0050.006

We achieved the best test error rate=0.29% and average test error=0.303%. It is the best accuracy and fastest training time result among other implementations(Keras, Tensorflow at 2017-11-23). The result on paper is 0.25% (average test error rate).

Implementationtest err(%)※train time/epochGPU Used
MXNet0.2936 sec2 GTX 1080
tensorflow0.49※ 10 minUnknown(4GB Memory)
Keras0.3055 sec2 GTX 1080 Ti


上一篇:face-recognition-with-3dmm-fitting

下一篇:CAFFE-CapsNet

用户评价
全部评价

热门资源

  • 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...