资源算法Capsule-Networks-Notebook-MNIST

Capsule-Networks-Notebook-MNIST

2020-03-27 | |  31 |   0 |   0

Capsule-Networks-Notebook-MNIST

This implementation is similar to the paper, I've only done classification, and not reconstruction. If you find any issues or can help make the code more readable, please reach out to me at sriram@ucsd.edu. This implementation is similar to gram.ai's implementation, but this one should run a bit faster.

I've mentioned the size of each variable after the corresponding line, for easy understanding.

Requirements

  • PyTorch 0.2+

  • Python 2

  • Torchvision (for MNIST)

Usage

Capsule Networks Notebook.ipynb

  • GPU - Just shift+return everything, it should run just fine. The code was meant for people to understand and requires some effort to repurpose (values are hardcoded).

  • No GPU - It's super slow but make sure to remove .cuda() from everywhere in the code.

Results

I got 99.4% testing accuracy at the end of 24th epoch and didn't have patience to run more. For 10 epochs, I obtained 99.33% test accuracy.


图片.png

Credits

Paper

Dynamic Routing between Capsules by Sara Sabour, Nicholas Frosst, and Geoffrey E. Hinton. https://arxiv.org/abs/1710.09829


上一篇:CapsNET-concepts

下一篇:CapsNet-implementation

用户评价
全部评价

热门资源

  • seetafaceJNI

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

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • shih-styletransfer

    shih-styletransfer Code from Style Transfer ...