Giter Site home page Giter Site logo

efficient-capsnet's Introduction

EFFICIENT-CAPSNET: CAPSULE NETWORK WITH SELF-ATTENTION ROUTING

model_plot

Tensorflow 2.x (with Keras API) Implementation of the Efficient-CapsNet (Mazzia et al., 2021)

Training and Testing (MNIST)

Use

python main.py --checkpoint_dir=checkpoint --num_epochs=15
  • checkpoint: path to save trained weights of the model.
  • num_epochs: Number of epochs. You can resume any previous training.

You can also simplify

python main.py --flagfile=./flags.txt

Environment (Docker)

If you use Docker, the code has been verified to work on tensorflow/tensorflow:2.6.0-gpu.

  • Pull Image & Run container & Get into shell
docker run -it --rm --runtime=nvidia tensorflow/tensorflow:2.6.0-gpu bash
  • (In container) Install and Run code
# Install git
apt-get update
apt-get install git
git clone https://github.com/kaparoo/Efficient-CapsNet.git
cd Efficient-CapsNet

# Install matplotlib
pip install matplotlib

# Training
python main.py --checkpoint_dir=checkpoint --num_epochs=15

References

  • Efficient-CapsNet: Capsule Network with Self-Attention Routing (arXiv)
  • Official Code (GitHub)

efficient-capsnet's People

Contributors

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