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
OpenDAS
Fairseq
Commits
7bcb487a
Commit
7bcb487a
authored
Jun 22, 2018
by
Myle Ott
Browse files
Fix typo
parent
3feaccf3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
fairseq/criterions/label_smoothed_cross_entropy.py
fairseq/criterions/label_smoothed_cross_entropy.py
+1
-1
No files found.
fairseq/criterions/label_smoothed_cross_entropy.py
View file @
7bcb487a
...
@@ -49,7 +49,7 @@ class LabelSmoothedCrossEntropyCriterion(FairseqCriterion):
...
@@ -49,7 +49,7 @@ class LabelSmoothedCrossEntropyCriterion(FairseqCriterion):
sample_size
=
sample
[
'target'
].
size
(
0
)
if
self
.
args
.
sentence_avg
else
sample
[
'ntokens'
]
sample_size
=
sample
[
'target'
].
size
(
0
)
if
self
.
args
.
sentence_avg
else
sample
[
'ntokens'
]
logging_output
=
{
logging_output
=
{
'loss'
:
utils
.
item
(
loss
.
data
)
if
reduce
else
loss
.
data
,
'loss'
:
utils
.
item
(
loss
.
data
)
if
reduce
else
loss
.
data
,
'nll_loss'
:
utils
.
item
(
nll_loss
.
data
)
if
reduce
else
loss
.
data
,
'nll_loss'
:
utils
.
item
(
nll_loss
.
data
)
if
reduce
else
nll_
loss
.
data
,
'ntokens'
:
sample
[
'ntokens'
],
'ntokens'
:
sample
[
'ntokens'
],
'sample_size'
:
sample_size
,
'sample_size'
:
sample_size
,
}
}
...
...
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