tom:

i.t ()


For anyone else who also needs help with this, notice the transpose (i.t()) in the last line and that you need to adjust the coordinates from the original example.
i = torch.LongTensor([[0, 1], [1, 0]])
v = torch.FloatTensor([3, 4])
torch.sparse.FloatTensor(i.t(), v, torch.Size([2,3])).to_dense()

 0  3  0
 4  0  0
[torch.FloatTensor of size 2x3]

Ok that worked. Thanks!