GithubHelp home page GithubHelp logo

xup6fup / mxnetr-capsulenet Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 31.15 MB

This is a simple example for implementing the Capsule Net by MxNetR

License: MIT License

R 100.00%
capsnet capsule-network mxnet r visualization

mxnetr-capsulenet's Introduction

Capsule Net in MxNetR

This is a simple example for implementing the Capsule Net by MxNetR. The original paper is titled "Dynamic Routing Between Capsules". However, I have reduce the number of filter of initial convolutional layer (256 -> 128) and number of capsule channel (32 -> 16). The number of deconvolution filter are also reduced (512, 1024 -> 128, 256). If you want to get the original Capsule Net reporting in paper, please revise the function parameters. This simplified Capsule Net only includes 3,695,488 parameters and achieve 98.96% accuracy in testing set. The model architecture information is stored in 4. Model architecture.R.

The MNIST dataset was converted to two csv data in the "data" folder. The first column represents the labels (0 to 9), and the other 784 columns represent the pixel value in a 28*28 images. If you want to repeat my work, please use 5. Training process.R for training. The training speed is about 200 samples/sec in a server with single NVIDIA tesla P100 (batch size = 20).

Following figure is a visualization example for understanding Capsule Net, and it can be repeated by 7. Predict and Reconstruction.R. The top images are real digit images, and the bottom images are imagined pictures by Capsule Net.

F1

mxnetr-capsulenet's People

Contributors

xup6fup avatar

Stargazers

 avatar  avatar  avatar

Watchers

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