Commit 5f29d123 authored by Myle Ott's avatar Myle Ott Committed by Sergey Edunov
Browse files

Small fixes

parent 56f9ec3c
......@@ -38,7 +38,7 @@ class LabelSmoothedNLLLoss(torch.autograd.Function):
ctx.grad_input = grad_input
if reduce:
return input.new([grad_input.view(-1).dot(input.view(-1))])
return grad_input.view(-1).dot(input.view(-1))
else:
return grad_input * input
......
......@@ -46,7 +46,7 @@ class SequenceScorer(object):
'alignment': alignment,
'positional_scores': pos_scores_i,
}]
# return results in the same format as SequenceGenenerator
# return results in the same format as SequenceGenerator
yield id, src, ref, hypos
def score(self, sample):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment