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
0cdafbf7
Unverified
Commit
0cdafbf7
authored
Sep 17, 2020
by
Stas Bekman
Committed by
GitHub
Sep 17, 2020
Browse files
remove duplicated code (#7173)
parent
45b0b1ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
3 deletions
+0
-3
src/transformers/tokenization_marian.py
src/transformers/tokenization_marian.py
+0
-3
No files found.
src/transformers/tokenization_marian.py
View file @
0cdafbf7
...
@@ -156,9 +156,6 @@ class MarianTokenizer(PreTrainedTokenizer):
...
@@ -156,9 +156,6 @@ class MarianTokenizer(PreTrainedTokenizer):
if
max_target_length
is
not
None
:
if
max_target_length
is
not
None
:
tokenizer_kwargs
[
"max_length"
]
=
max_target_length
tokenizer_kwargs
[
"max_length"
]
=
max_target_length
if
max_target_length
is
not
None
:
tokenizer_kwargs
[
"max_length"
]
=
max_target_length
self
.
current_spm
=
self
.
spm_target
self
.
current_spm
=
self
.
spm_target
model_inputs
[
"labels"
]
=
self
(
tgt_texts
,
**
tokenizer_kwargs
)[
"input_ids"
]
model_inputs
[
"labels"
]
=
self
(
tgt_texts
,
**
tokenizer_kwargs
)[
"input_ids"
]
self
.
current_spm
=
self
.
spm_source
self
.
current_spm
=
self
.
spm_source
...
...
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