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
207ed8cb
Unverified
Commit
207ed8cb
authored
Sep 03, 2020
by
Sam Shleifer
Committed by
GitHub
Sep 03, 2020
Browse files
[s2s] use --eval_beams command line arg (#6926)
parent
0f360d3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
examples/seq2seq/finetune.py
examples/seq2seq/finetune.py
+1
-0
No files found.
examples/seq2seq/finetune.py
View file @
207ed8cb
...
...
@@ -202,6 +202,7 @@ class SummarizationModule(BaseTransformer):
attention_mask
=
batch
[
"attention_mask"
],
use_cache
=
True
,
decoder_start_token_id
=
self
.
decoder_start_token_id
,
num_beams
=
self
.
eval_beams
,
)
gen_time
=
(
time
.
time
()
-
t0
)
/
batch
[
"input_ids"
].
shape
[
0
]
preds
:
List
[
str
]
=
self
.
ids_to_clean_text
(
generated_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