mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-25 08:11:06 +08:00
Update sparse.py (#2336)
This commit is contained in:
committed by
Soumith Chintala
parent
5caa42b538
commit
e51fec3be0
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user