Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
b61d5b47
Unverified
Commit
b61d5b47
authored
May 03, 2023
by
Younes Belkada
Committed by
GitHub
May 03, 2023
Browse files
[`Doctest`] Fix pix2struct doctest (#23121)
fix pix2struct doctest
parent
4b6aecb4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/pix2struct/modeling_pix2struct.py
src/transformers/models/pix2struct/modeling_pix2struct.py
+1
-1
No files found.
src/transformers/models/pix2struct/modeling_pix2struct.py
View file @
b61d5b47
...
@@ -1702,7 +1702,7 @@ class Pix2StructForConditionalGeneration(Pix2StructPreTrainedModel):
...
@@ -1702,7 +1702,7 @@ class Pix2StructForConditionalGeneration(Pix2StructPreTrainedModel):
>>> outputs = model(**inputs, labels=labels)
>>> outputs = model(**inputs, labels=labels)
>>> loss = outputs.loss
>>> loss = outputs.loss
>>> print(f"{loss.item():.5f}")
>>> print(f"{loss.item():.5f}")
4.58370
5.95566
```"""
```"""
use_cache
=
use_cache
if
use_cache
is
not
None
else
self
.
config
.
text_config
.
use_cache
use_cache
=
use_cache
if
use_cache
is
not
None
else
self
.
config
.
text_config
.
use_cache
return_dict
=
return_dict
if
return_dict
is
not
None
else
self
.
config
.
use_return_dict
return_dict
=
return_dict
if
return_dict
is
not
None
else
self
.
config
.
use_return_dict
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment