资源算法capsnet-greebles

capsnet-greebles

2020-03-27 | |  36 |   0 |   0

cos429-capsnet

Comparing Traditional CNNs and Capsule Networks with Greebles Classification.
Implementation of the capsule network is adapted from naturomics/CapsNet-Tensorflow.

Getting Started

Install anaconda or miniconda. Then create the environment with conda.

# Use TensorFlow with GPU
$ conda env create -f environment-gpu.yml

Download data

Change the dataset flag in config.py as needed. Run the following script to download and extract data files.

$ python data.py

For affNIST and smallnorb, also run the scripts:

$ python affnist.py
$ python smallnorb.py

For Greebles, generate a greebles dataset with the script found at sherrybai/greebles-generator. Extract the resulting zip file into the directory data/greebles. Then, run the script:

$ python greebles.py

Add a new entry to datasets.yml if you wish to test on another dataset not already included.

Training and Testing

Training a model:

$ python {model}_train.py

Testing a model:

$ python {model}_eval.py

i.e. python cnn_train.py

Logs and train/validation/test csv files can be found under logs/ and summary/.
Visualize plots with tensorboard:

$ tensorboard --logdir=logdir


上一篇:capsnet.js

下一篇:capsnet_NLP

用户评价
全部评价

热门资源

  • TensorFlow-Course

    This repository aims to provide simple and read...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • mxnet_VanillaCNN

    This is a mxnet implementation of the Vanilla C...

  • DuReader_QANet_BiDAF

    Machine Reading Comprehension on DuReader Usin...

  • Klukshu-Sockeye-...

    KLUKSHU SOCKEYE PROJECTS 2016 This repositor...