Code Monkey home page Code Monkey logo

matrix-capsule-networks-pytorch's Introduction

Matrix-Capsule-Networks-PyTorch

A PyTorch implementation of Matrix capsule networks by Hinton et al.

I used the https://github.com/yl-1993/Matrix-Capsules-EM-PyTorch code as a starter and improved the accuracy achieved by the code ,and also i made the training code more friendly.You can use your own dataset with this implementation, just replace the dataset and data_folder variables in the main notebook with the path to your own data. Additionally, I have uploaded the weight of the model in this repo you can find it under the name of model_model222_A_103.pth.

This implementation achieves 92% accuracy on smallNORB dataset, which is the highest accuracy achieved by a pytorch implementation. Based on the Hinton's interview with the openreview, I used a weight decay of 2e-7 and exponential learning decay with a factor of 0.96. This implemetation uses A=64, B=8, C=16, D=16, K=3 and 2 number of EM routing iterations for the nework. Also, the initial learning rate is set to 3e-3.Batch size of 32 has been used for the training.

The training is done on a NVIDIA GTX 1070 TI. Each epoch takes about 16-17 mins.

matrix-capsule-networks-pytorch's People

Contributors

moeinh77 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

matrix-capsule-networks-pytorch's Issues

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.