-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
gaotianyu1350
committed
Jan 24, 2019
1 parent
f5ef0a9
commit 97120c1
Showing
2 changed files
with
22 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,23 @@ | ||
# Hybrid Attention-Based Prototypical Networks for Noisy Few-Shot Relation Classification | ||
Code and data of AAAI2019 paper _Hybrid Attention-Based Prototypical Networks for Noisy Few-Shot Relation Classification_. | ||
|
||
Code and data for AAAI2019 paper _Hybrid Attention-Based Prototypical Networks for Noisy Few-Shot Relation Classification_. | ||
|
||
Author: Tianyu Gao*, Xu Han*, Zhiyuan Liu, Maosong Sun. (\* means equal contribution) | ||
|
||
## Dataset and Word Embedding | ||
|
||
We evaluate our models on [FewRel](https://thunlp.github.io/fewrel), a large-scale dataset for few-shot relation classification. It has 100 relations and 700 instances for each relation. You can find some baseline models from [here](https://github.com/thunlp/fewrel). | ||
|
||
Due to the large size, we did not upload the glove file (pre-trained word embedding). Please download `glove.6B.50d.json` from [Tsinghua Cloud](https://cloud.tsinghua.edu.cn/f/b14bf0d3c9e04ead9c0a/?dl=1) or [Google Drive](https://drive.google.com/open?id=1UnncRYzDpezPkwIqhgkVW6BacIqz6EaB) and put it under `data/` folder. | ||
|
||
## Usage | ||
|
||
To run our code, use this command for training | ||
```bash | ||
python train.py {MODEL_NAME} {N} {K} {NOISE_RATE} | ||
``` | ||
and use this command for testing | ||
```bash | ||
python test.py {MODEL_NAME} {N} {K} {NOISE_RATE} | ||
``` | ||
where {MODEL_NAME} could be `proto` or `proto_hatt`, `{N}` is the num of classes, `{K}` is the num of instances for each class and `{NOISE_RATE}` is the probability that one instance is wrong-labeled. |