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
9f1747f9
Unverified
Commit
9f1747f9
authored
Nov 03, 2020
by
Patrick von Platen
Committed by
GitHub
Nov 03, 2020
Browse files
[Seq2Seq] Correct import in Seq2Seq Trainer (#8254)
parent
504ff7bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
examples/seq2seq/seq2seq_trainer.py
examples/seq2seq/seq2seq_trainer.py
+1
-4
No files found.
examples/seq2seq/seq2seq_trainer.py
View file @
9f1747f9
...
...
@@ -62,10 +62,7 @@ class Seq2SeqTrainer(Trainer):
self
.
loss_fn
=
torch
.
nn
.
CrossEntropyLoss
(
ignore_index
=
self
.
config
.
pad_token_id
)
else
:
# dynamically import label_smoothed_nll_loss
try
:
from
.utils
import
label_smoothed_nll_loss
except
ImportError
:
from
utils
import
label_smoothed_nll_loss
from
utils
import
label_smoothed_nll_loss
self
.
loss_fn
=
label_smoothed_nll_loss
...
...
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