sparsemax
sparsemax copied to clipboard
1D tensors fail
- 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....