103

GitHub - JunYeopLee/capsule-networks: A Tensorflow(v1.4) implementation of Capsu...

 6 years ago
source link: https://github.com/JunYeopLee/capsule-networks
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

A Tensorflow implementation of Capsule networks

Requirements

  • tensorflow >= 1.4 (Probably 1.3 should work, too, though I didn't test it)
  • numpy
  • pillow
  • scipy

Capsule network

I tried to implement the idea in Dynamic Routing Between Capsules

capsNet.png

File description

  • config.py includes all hyper parameters that are needed.
  • utils.py contains functions regarding loading and saving.
  • model.py has all building blocks for capsNet and whole model implementation.
  • train.py is for training.
  • eval.py is for evaluation.

Usage

Training

$ python train.py

Evaluation

$ python eval.py

Training

margin_loss.png reconstruction_loss.png total_loss.png

Result

Classification

Epoch 10
Test Acc. 99.278

Reconstruction

test_000.png test_005.png test_010.png


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK