WSDM2022 "A Simple but Effective Bidirectional Extraction Framework for Relational Triple Extraction"

Related tags

Deep Learning BiRTE
Overview

BiRTE

WSDM2022 "A Simple but Effective Bidirectional Extraction Framework for Relational Triple Extraction"

Requirements

The main requirements are:

  • python 3.6
  • torch 1.4.0
  • tqdm
  • transformers == 2.8.0

Usage

  1. Train and select the model

python run.py --dataset=WebNLG --train=train --batch_size=6

python run.py --dataset=WebNLG_star --train=train --batch_size=6

python run.py --dataset=NYT --train=train --batch_size=18

python run.py --dataset=NYT_star --train=train --batch_size=18

python run.py --dataset=NYT10 --train=train --batch_size=18

python run.py --dataset=NYT11 --train=train --batch_size=18

  1. Evaluate on the test set

python run.py --dataset=WebNLG --train=test

python run.py --dataset=WebNLG_star --train=test

python run.py --dataset=NYT --train=test

python run.py --dataset=NYT_star --train=test

python run.py --dataset=NYT10 --train=test

python run.py --dataset=NYT11 --train=test

You might also like...
Comments
  • 损失函数的计算

    损失函数的计算

    你好,关于代码中损失函数的计算,我不太理解,主要是这一行,loss = relu(pred) - pred * targets + torch.log(1 + torch.exp(-1 * torch.abs(pred).to("cuda"))).to("cuda"),希望能得到您的回复

    opened by cool7426 0
Owner
null