taishan1994 / pointernet_chinese_information_extraction Goto Github PK
View Code? Open in Web Editor NEW利用指针网络进行信息抽取,包含命名实体识别、关系抽取、事件抽取。
利用指针网络进行信息抽取,包含命名实体识别、关系抽取、事件抽取。
怎么解决啊
Which version of pythorh and transformers is correct?
跑了40个epoch的评价指标一直都是0,怎么样才能得到和作者相同的成果呢?
loss一直停在0.1左右
transformers 4.25.1
torch 1.9.0
class EeArgs:
tasks = ["obj"]
data_name = "duee"
data_dir = "ee"
bert_dir = "model_hub/chinese-bert-wwm-ext/"
save_dir = "./checkpoints/{}/{}_{}_model.pt".format(data_dir, tasks[0], data_name)
train_path = "./data/{}/{}/duee_train.json".format(data_dir, data_name)
dev_path = "./data/{}/{}/duee_dev.json".format(data_dir, data_name)
test_path = "./data/{}/{}/duee_dev.json".format(data_dir, data_name)
label_path = "./data/{}/{}/labels.txt".format(data_dir, data_name)
with open(label_path, "r") as fp:
entity_label = fp.read().strip().split("\n")
ent_label2id = {}
ent_id2label = {}
for i, label in enumerate(entity_label):
ent_label2id[label] = i
ent_id2label[i] = label
ner_num_labels = len(entity_label)
train_epoch = 40
train_batch_size = 32
eval_batch_size = 32
eval_step = 500
max_seq_len = 256
weight_decay = 0.01
adam_epsilon = 1e-8
max_grad_norm = 5.0
lr = 3e-5
other_lr = 3e-4
warmup_proportion = 0.01
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
tokenizer = BertTokenizer.from_pretrained(bert_dir)
大佬,UIE是怎么引入的呀?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.