prototypical networks
1.0.0
몇 가지 샷 학습을위한 NIPS 2017 Paper 프로토 타입 네트워크 코드.
이 코드를 사용하는 경우 논문을 인용하십시오.
@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 또는 python setup.py develop 실행하여 Protonets 패키지를 설치하십시오.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 .