Coder Social home page Coder Social logo

haonanli / capsnet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from leftthomas/capsnet

0.0 2.0 0.0 203 KB

A PyTorch implementation of CapsNet based on Geoffrey Hinton's paper "Dynamic Routing Between Capsules"

License: MIT License

Python 100.00%

capsnet's Introduction

CapsNet

A PyTorch implementation of CapsNet based on Geoffrey Hinton's paper Dynamic Routing Between Capsules

Requirements

conda install pytorch torchvision -c soumith
conda install pytorch torchvision cuda80 -c soumith # install it if you have installed cuda
  • PyTorchNet
pip install git+https://github.com/pytorch/tnt.git@master
  • tqdm
pip install tqdm

Usage

git clone https://github.com/leftthomas/CapsNet.git
cd CapsNet
python -m visdom.server & python main.py

Visdom now can be accessed by going to 127.0.0.1:8097 in your browser, or your own host address if specified.

Benchmarks

Highest accuracy was 99.57% after 30 epochs. The model may achieve a higher accuracy as shown by the trend of the loss/accuracy graphs below.

The confusion matrix of the digit numbers are showed below.

The reconstructions of the digit numbers are showed at right and the ground truth at left.

Default PyTorch Adam optimizer hyperparameters were used with no learning rate scheduling. Epochs with batch size of 100 takes ~2 minutes on a NVIDIA GTX 1070 GPU.

Other Implementations

Credits

Primarily referenced this implementation: PyTorch implementation by @Gram.AI

capsnet's People

Contributors

leftthomas avatar

Watchers

James Cloos 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.