-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update layoutxlm/modeling.py #2285
Conversation
feature_block, axis=0) | ||
start_idx = i | ||
|
||
if input_ids[batch_id, i] == 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
@@ -911,6 +939,73 @@ def forward( | |||
return outputs | |||
|
|||
|
|||
class LayoutXLMForSequenceClassification(LayoutXLMPretrainedModel): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的 class 名称改为 LayoutXLMForSegmentClassification 更加合适些
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yingyibiao 为什么呢?不和HF保持一直的目的是?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HF 里面 LayoutXLMForSequenceClassification class 对应的是图片分类任务,这个 PR 里面的则为文本段落分类任务,所以建议换个名字。
Merge then fix by PaddleNLP Team. @yingyibiao |
PR types
Function optimization
PR changes
Models
Description
Add a new model to use Sequence feature to do SER task.