Skip to content

Commit

Permalink
Fix TypeError on CPU
Browse files Browse the repository at this point in the history
  • Loading branch information
tsurumeso committed Dec 29, 2019
1 parent 47b7249 commit 5804c6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/loss/clipped_weighted_huber_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def forward(self, inputs):
xp.square(abs_diff, out=abs_diff)
y = (y - abs_diff) * 0.5

return y.mean(),
return xp.array(y.mean(), dtype=y.dtype),

def backward(self, inputs, grad_outputs):
xp = cuda.get_array_module(*inputs)
Expand Down

0 comments on commit 5804c6d

Please sign in to comment.