prototypical networks
1.0.0
NIPS 2017 Paper Prototypical Networks for The Bemoting Shot Learningのコード。
このコードを使用する場合は、私たちの論文を引用してください。
@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 。python setup.py installまたはpython setup.py developを実行して、Protonetsパッケージをインストールします。sh download_omniglot.sh実行します。python scripts/train/few_shot/run_train.pyを実行します。これにより、トレーニングが実行され、結果がresultsになります。EXP_DIRが希望する出力ディレクトリであるオプション--log.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 。