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
c9693668
"...metaportrait_pytorch.git" did not exist on "5cd956ef82be839a3161de3b722550ba8a637266"
Unverified
Commit
c9693668
authored
Feb 13, 2021
by
Manuel Romero
Committed by
GitHub
Feb 13, 2021
Browse files
Fix typo in comments (#10157)
parent
c9837a0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/generation_utils.py
src/transformers/generation_utils.py
+2
-2
No files found.
src/transformers/generation_utils.py
View file @
c9693668
...
...
@@ -1245,7 +1245,7 @@ class GenerationMixin:
outputs
,
model_kwargs
,
is_encoder_decoder
=
self
.
config
.
is_encoder_decoder
)
# stop when there is a </s> in each sentence, or if we exceed the maximu
l
length
# stop when there is a </s> in each sentence, or if we exceed the maximu
m
length
if
unfinished_sequences
.
max
()
==
0
:
break
...
...
@@ -1451,7 +1451,7 @@ class GenerationMixin:
sequence_lengths
,
unfinished_sequences
,
cur_len
,
next_tokens
==
eos_token_id
)
# stop when there is a </s> in each sentence, or if we exceed the maximu
l
length
# stop when there is a </s> in each sentence, or if we exceed the maximu
m
length
if
unfinished_sequences
.
max
()
==
0
:
break
...
...
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