prototypical networks
1.0.0
NIPS 2017紙張原型網絡的代碼,用於幾次學習。
如果您使用此代碼,請引用我們的論文:
@inproceedings{snell2017prototypical,
title={Prototypical Networks for Few-shot Learning},
author={Snell, Jake and Swersky, Kevin and Zemel, Richard},
booktitle={Advances in Neural Information Processing Systems},
year={2017}
}
pip install git+https://github.com/pytorch/tnt.git@master安裝Torchnet。python setup.py install安裝質子軟件包。 Pyinstall或python setup.py develop 。sh download_omniglot.sh 。python scripts/train/few_shot/run_train.py 。這將進行培訓並將結果納入results 。--log.exp_dir EXP_DIR來指定不同的輸出目錄,其中EXP_DIR是您所需的輸出目錄。--data.cuda 。python scripts/train/few_shot/run_trainval.py 。默認情況下,這將使您的模型將您的模型保存到results/trainval中。python scripts/predict/few_shot/run_eval.py --model.model_path results/trainval/best_model.pt 。