sparsemax icon indicating copy to clipboard operation
sparsemax copied to clipboard

1D tensors fail

Open smorad opened this issue 4 years ago • 0 comments

  • sparsemax version: pip latest
  • Python version: 3.8
  • Operating System: Ubuntu 20.04

Description

Sparsemax fails for 1D tensors

What I Did

>>> import torch
>>> from sparsemax import Sparsemax
>>> Sparsemax()(torch.rand(10))

RuntimeError: expand(torch.LongTensor....

smorad avatar Aug 12 '21 14:08 smorad