Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
67d9fc50
Unverified
Commit
67d9fc50
authored
Sep 17, 2020
by
Sam Shleifer
Committed by
GitHub
Sep 17, 2020
Browse files
[s2s] remove double assert (#7223)
parent
edbaad2c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
5 deletions
+0
-5
examples/seq2seq/finetune.py
examples/seq2seq/finetune.py
+0
-5
No files found.
examples/seq2seq/finetune.py
View file @
67d9fc50
...
@@ -102,11 +102,6 @@ class SummarizationModule(BaseTransformer):
...
@@ -102,11 +102,6 @@ class SummarizationModule(BaseTransformer):
}
}
assert
self
.
target_lens
[
"train"
]
<=
self
.
target_lens
[
"val"
],
f
"target_lens:
{
self
.
target_lens
}
"
assert
self
.
target_lens
[
"train"
]
<=
self
.
target_lens
[
"val"
],
f
"target_lens:
{
self
.
target_lens
}
"
assert
self
.
target_lens
[
"train"
]
<=
self
.
target_lens
[
"test"
],
f
"target_lens:
{
self
.
target_lens
}
"
assert
self
.
target_lens
[
"train"
]
<=
self
.
target_lens
[
"test"
],
f
"target_lens:
{
self
.
target_lens
}
"
if
self
.
hparams
.
sortish_sampler
and
self
.
hparams
.
gpus
>
1
:
raise
AssertionError
(
"Sortish Sampler does not work for multigpu"
)
if
self
.
hparams
.
sortish_sampler
and
self
.
hparams
.
max_tokens_per_batch
is
not
None
:
raise
AssertionError
(
"max tokens per batch and sortish sampler are incompatible."
)
if
self
.
hparams
.
freeze_embeds
:
if
self
.
hparams
.
freeze_embeds
:
self
.
freeze_embeds
()
self
.
freeze_embeds
()
if
self
.
hparams
.
freeze_encoder
:
if
self
.
hparams
.
freeze_encoder
:
...
...
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