Solved by rasbt in post #4 
              
              
                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()

---------------------------------------------------------------------------
Run…