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
c3317e1f
Unverified
Commit
c3317e1f
authored
Sep 07, 2020
by
Stas Bekman
Committed by
GitHub
Sep 07, 2020
Browse files
typo (#6959)
there is no var `decoder_input_ids`, but there is `input_ids` for decoder :)
parent
10c6f94a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/generation_utils.py
src/transformers/generation_utils.py
+1
-1
No files found.
src/transformers/generation_utils.py
View file @
c3317e1f
...
@@ -411,7 +411,7 @@ class GenerationMixin:
...
@@ -411,7 +411,7 @@ class GenerationMixin:
)
# shape: (batch_size * num_return_sequences * num_beams, cur_len)
)
# shape: (batch_size * num_return_sequences * num_beams, cur_len)
if
self
.
config
.
is_encoder_decoder
:
if
self
.
config
.
is_encoder_decoder
:
# create empty decoder
_
input_ids
# create empty decoder
input_ids
input_ids
=
torch
.
full
(
input_ids
=
torch
.
full
(
(
effective_batch_size
*
num_beams
,
1
),
(
effective_batch_size
*
num_beams
,
1
),
decoder_start_token_id
,
decoder_start_token_id
,
...
...
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