haalim:

images





 haalim:

49152 x 49152


Can’t you express the needed connectivity with convolutions?
Anyway, about sparse, I just checked if it works:
i = torch.LongTensor([[0, 1, 1], [2, 0, 2]])
v = nn.Parameter(torch.FloatTensor([3, 4, 5]))
w = torch.sparse.FloatTensor(i,v, torch.Size([2,3]))
w.to_dense()
  tensor(cpu,(2, 3)[[0., 0., 3.],
        [4., 0., 5.]], grad_fn=<ToDenseBackward>)
x = torch.randn(5,3)
y=torch.sparse.mm(w, x.t()).t()
y.shape
  torch.Size([5, 2])
y.backward(torch.ones_like(y))
v.grad
  tensor(cpu,(3,)[-1.6546, -3.2455, -3.2455])