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 。