Hinton膠囊網路論文《Dynamic Routing between Capsules》的程式碼正式開源
阿新 • • 發佈:2019-01-07
執行測試驗證設定是否正確,例如:
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:
-
將提取的二進位制檔案的目錄作為 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/