HUSTAI / uie_pytorch

PaddleNLP UIE模型的PyTorch版实现
Apache License 2.0
539 stars 93 forks source link

模型输出问题 #19

Open BEILOP opened 1 year ago

BEILOP commented 1 year ago

想问下,我想像bert输出那样取出最后一层的隐藏状态和pooler_output值,代码这么写有无问题:

model= UIE.frompretrained(路径)
last_hidden_state = model(inputs*).hidden_states[-1]
pooler_output = torch.max(model(inputs*).hidden_states[-1])

另外,模型输出的start_prob,end_prob是什么?