RuntimeError: sizes is inconsistent with indices. Pytorch 0.4.1

When using pytorch 0.4.1 I constantly get RunTimeError when creating sparse FloatTensors:

num_nodes = 200
num_edges = 390
n2n_idxes = torch.LongTensor(2, num_edges2)
n2n_vals = torch.FloatTensor(num_edges
2)
n2n_sp = torch.sparse.FloatTensor(n2n_idxes, n2n_vals, torch.Size([num_nodes, num_nodes]))

with the following error:
RuntimError: size is inconsistent with indices: for dim 0, size is 200 but found 49529943793360929.

The value changes naturally, but it seems to happen with large values only or when they appear to be negative within n2n_idxes. Any solutions?

Could you update to the latest stable PyTorch version (1.6), as this might have been a known bug, which might have been fixed already.