Update sparse.py (#2336)

This commit is contained in:
adampolyak
2017-08-08 14:16:52 +03:00
committed by Soumith Chintala
parent 5caa42b538
commit e51fec3be0

View File

@ -45,7 +45,7 @@ class Embedding(Function):
output = weight.new()
if max_norm is not None:
cls._renorm(indices, weight, max_norm, norm_type)
cls._renorm(ctx, indices, weight, max_norm, norm_type)
if indices.dim() == 1:
output = torch.index_select(weight, 0, indices)