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
a94105f9
Unverified
Commit
a94105f9
authored
Dec 15, 2021
by
Yih-Dar
Committed by
GitHub
Dec 15, 2021
Browse files
Fix preprocess_function in run_summarization_flax.py (#14769)
Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
7e61d56a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/flax/summarization/run_summarization_flax.py
examples/flax/summarization/run_summarization_flax.py
+1
-1
No files found.
examples/flax/summarization/run_summarization_flax.py
View file @
a94105f9
...
@@ -533,7 +533,7 @@ def main():
...
@@ -533,7 +533,7 @@ def main():
model_inputs
[
"labels"
]
=
labels
[
"input_ids"
]
model_inputs
[
"labels"
]
=
labels
[
"input_ids"
]
decoder_input_ids
=
shift_tokens_right_fn
(
decoder_input_ids
=
shift_tokens_right_fn
(
jnp
.
array
(
labels
[
"input_ids"
]
)
,
config
.
pad_token_id
,
config
.
decoder_start_token_id
labels
[
"input_ids"
],
config
.
pad_token_id
,
config
.
decoder_start_token_id
)
)
model_inputs
[
"decoder_input_ids"
]
=
np
.
asarray
(
decoder_input_ids
)
model_inputs
[
"decoder_input_ids"
]
=
np
.
asarray
(
decoder_input_ids
)
...
...
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