Skip to content

thunlp/RSN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenRE

The source code of Relational Siamese Network (EMNLP2019)
Future up-to-date versions will be available in: https://github.com/thunlp/RSN

Environment

You only need TensorFlow(>=1.12.0) to run this code.
conda create -n rsn python=3.6
pip install networkx python-louvain tensorflow-gpu==1.12

Data

You can download data by:
bash download.sh
The data is already preprocessed from the original FewRel and Glove data.

Running CNN

A standard CNN for supervised RE can be trained by
cd CNN
python train_CNN.py

Running RSN

The Relational Siamese Network for OpenRE can be trained by
cd RSN
python train_RSN.py
By default it will be trained as a semi-supervised RSN.

A supervised RSN can be trained by
python train_RSN.py --trainset_loss_type cross --testset_loss_type none

Future Work

The FewRel-distant dataset and more models will be released in the future.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published