Implementation of Logic Attention Network in PyTorch (currently without inductive test)
Notes:
- This repo currently does not support inductive testing, e.g. aux and dev data in the original repo are not needed and removed.
- This repo currently contains only Attention aggregator and TransE score.
- L2 regularization is temporarily removed.
The model must be trained with GPU.
Dataset should be put under data
directory, and it should contain files including train
, test
, entity2id.txt
and
relation2id.txt
. To translate the data in index format, see utils.preprocess
(the function will overwritten the original files!)
Filter out the known entities (i.e., the ones in train set)