Skip to content

Commit

Permalink
Update denseToSparse.py re issue 220
Browse files Browse the repository at this point in the history
  • Loading branch information
btgraham authored Jan 26, 2022
1 parent 6752a3d commit fe38ab5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sparseconvnet/denseToSparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def forward(
s = torch.LongTensor(nz.stride()).view(1, dimension + 1)
nz = nz.nonzero()
s = s.type_as(nz)
aa = aa.view(-1, input.size(1))
aa = aa.reshape(-1, input.size(1))
ctx.aas2 = aa.size()
r = (nz * s.expand_as(nz)).sum(1).view(-1)
output_features = aa.index_select(0, r)
Expand Down

0 comments on commit fe38ab5

Please sign in to comment.