An implementation of RGCN for Link Prediction task in Pytorch and DGL.
This work is based on https://github.com/dmlc/dgl/tree/master/examples/pytorch/rgcn and some tricks are added to speed up training and test process.
- Install Python3
- Install requirements
pip install -r requirements.txt
python run.py --dataset FB15k-237 --filtered --edge-sampler uniform --gpu 0
--dataset
denotes the dataset to use--filtered
denotes the evaluation protocol.--filtered
or--raw
edge-sampler
denotes the sampling methods.uniform
orneighbor
- Rest of the arguments can be listed using python run.py -h
Protocol | MRR | Hits@1 | Hits@3 | Hits@10 | Command |
---|---|---|---|---|---|
Filtered | 0.243743 | 0.154622 | 0.263657 | 0.427196 | python run.py --filtered --gpu 0 |
Raw | 0.163159 | 0.099262 | 0.165494 | 0.293633 | python run.py --raw --gpu 0 |