Overview
I want to use -1 as an ignore index of an embedding layers.
But it does not work.
Environment
Python: 3.7.1
torch: 1.1.0
To Reproduce
embedding = nn.Embedding(10, 3, padding_idx=-1)
tokens = torch.tensor([-1, 2]).long()
embedding(tokens)

The third line, in the above, shows
RuntimeError: index out of range at ../aten/src/TH/generic/THTensorEvenMoreMath.cpp:193