-
Notifications
You must be signed in to change notification settings - Fork 28k
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
Add LayoutLMForQuestionAnswering model #18407
Changes from 1 commit
7d2a809
272fce0
5611bd8
f8d351c
fd8ec43
3bc8dbc
2d044af
ea99a2f
cb28258
5e55166
6c9ce40
0921d57
3361b0b
2351b45
971883b
2c46367
090673d
6029d4f
499d3ea
fc163aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -964,6 +964,7 @@ def call( | |
|
||
>>> last_hidden_states = outputs.last_hidden_state | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add an expected output shape here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comment as above (prefer to do that in a separate change) |
||
```""" | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line shouldn't be added There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
outputs = self.layoutlm( | ||
input_ids=input_ids, | ||
bbox=bbox, | ||
|
@@ -1094,6 +1095,7 @@ def call( | |
|
||
>>> loss = outputs.loss | ||
```""" | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comments here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
outputs = self.layoutlm( | ||
input_ids=input_ids, | ||
bbox=bbox, | ||
|
@@ -1217,6 +1219,7 @@ def call( | |
>>> loss = outputs.loss | ||
>>> logits = outputs.logits | ||
```""" | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comments here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comments here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
outputs = self.layoutlm( | ||
input_ids=input_ids, | ||
bbox=bbox, | ||
|
@@ -1345,6 +1348,7 @@ def call( | |
>>> loss = outputs.loss | ||
>>> logits = outputs.logits | ||
```""" | ||
|
||
outputs = self.layoutlm( | ||
input_ids=input_ids, | ||
bbox=bbox, | ||
|
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.
To confirm the code examples work as expected, it would be great to add LayoutLM (v1) to the doc tests. Details here: https://github.com/huggingface/transformers/tree/main/docs#testing-documentation-examples
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.
Done