Not sure, but could be a similar issue related to emptry tensors, like
i = torch.LongTensor([[], [], []])
v = torch.FloatTensor([3,      4,      5    ])
torch.sparse.FloatTensor(i.t(), v, torch.Size([2, 3])).to_dense()

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-34-cc45613f2ec1> in <module>()
----> 1 i = torch.LongTensor([[], [], []])
      2 v = torch.FloatTensor([3,      4,      5    ])
      3 torch.sparse.FloatTensor(i.t(), v, torch.Size([2, 3])).to_dense()

RuntimeError: sizes must be non-negative