프로젝트
GitHub에서 보기
jakesnell/prototypical-networks
소개
NeurIPS 2017 논문 "Few-shot Learning을 위한 Prototypical Networks"의 코드
시스템 및 인프라측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- -1
- in 1 month
- -3
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalPrototypical Networks for Few-shot Learning
Code for the NIPS 2017 paper Prototypical Networks for Few-shot Learning.
If you use this code, please cite our 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}
}
Training a prototypical network
Install dependencies
- This code has been tested on Ubuntu 16.04 with Python 3.6 and PyTorch 0.4.
- Install PyTorch and torchvision.
- Install torchnet by running
pip install git+https://github.com/pytorch/tnt.git@master. - Install the protonets package by running
python setup.py installorpython setup.py develop.
Set up the Omniglot dataset
- Run
sh download_omniglot.sh.
Train the model
- Run
python scripts/train/few_shot/run_train.py. This will run training and place the results intoresults.- You can specify a different output directory by passing in the option
--log.exp_dir EXP_DIR, whereEXP_DIRis your desired output directory. - If you are running on a GPU you can pass in the option
--data.cuda.
- You can specify a different output directory by passing in the option
- Re-run in trainval mode
python scripts/train/few_shot/run_trainval.py. This will save your model intoresults/trainvalby default.
Evaluate
- Run evaluation as:
python scripts/predict/few_shot/run_eval.py --model.model_path results/trainval/best_model.pt.
관련 프로젝트 살펴보기
불러오는 중…