Codes for our paper "From Learning-to-Match to Learning-to-Discriminate: Global Prototype Learning for Few-shot Relation Classification"[paper]
we use the official FewRel dataset for training and evaluation, please download from https://github.com/thunlp/FewRel and put data files into ./data directory.
pip install -r requirements.txt
python train_demo.py --mode train
bash test.sh # replace the file path in this file