github地址:https://github.com/Sarasra/models/tree/master/research/capsules
运行测试验证设置是否正确,例如:
python layers_test.py
快速MNIST测试结果:
-
从以下网址下载并提取MNIST记录到 $DATA_DIR/:https://storage.googleapis.com/capsule_toronto/mnist_data.tar.gz
-
从以下网址下载并提取MNIST模型checkpoint到$CKPT_DIR: https://storage.googleapis.com/capsule_toronto/mnist_checkpoints.tar.gz
python experiment.py --data_dir=$DATA_DIR/mnist_data/ --train=false
--summary_dir=/tmp/ --checkpoint=$CKPT_DIR/mnist_checkpoint/model.ckpt-1
快速CIFAR10 ensemble测试结果:
-
从以下网址下载并提取cifar10二进制版本到 $DATA_DIR/:https://www.cs.toronto.edu/~kriz/cifar.html
-
从以下网址下载并提取cifar10模型checkpoint到 $CKPT_DIR: https://storage.googleapis.com/capsule_toronto/cifar_checkpoints.tar.gz
-
将提取的二进制文件的目录作为 data_dir 传递给($ DATA_DIR)
python experiment.py --data_dir=$DATA_DIR --train=false --dataset=cifar10
--hparams_override=num_prime_capsules=64,padding=SAME,leaky=true,remake=false
--summary_dir=/tmp/ --checkpoint=$CKPT_DIR/cifar/cifar{}/model.ckpt-600000
--num_trials=7
CIFAR10训练命令:
python experiment.py --data_dir=$DATA_DIR --dataset=cifar10 --max_steps=600000
--hparams_override=num_prime_capsules=64,padding=SAME,leaky=true,remake=false
--summary_dir=/tmp/
MNIST的完整训练命令:
-
在 training-validation pass 训练,validate=true 也是如此
-
要在一个以上的GPU pass训练,num_gpus = NUM_GPUS
python experiment.py --data_dir=$DATA_DIR/mnist_data/ --max_steps=300000
--summary_dir=/tmp/attempt0/
最后
以上就是愤怒网络最近收集整理的关于Hinton胶囊网络论文《Dynamic Routing between Capsules》的代码正式开源的全部内容,更多相关Hinton胶囊网络论文《Dynamic内容请搜索靠谱客的其他文章。
发表评论 取消回复