Skip to content

[Question]: UIE获取梯度 #4998

@DavidKongKK

Description

@DavidKongKK

请提出你的问题

目前我有已经finetune过的UIE模型,想在评测过程中获取每个token关于预测结果的积分梯度获得显著性得分。我尝试过在evaluate.py中调用start_prob与end_prob的backward()并查看其grad属性,但是其值永远是1,如下图
image
请问这样的结果是为什么,我应该怎样获取正确的梯度。

Metadata

Metadata

Labels

questionFurther information is requestedtriage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions