PRBonn/lidar-bonnetal

[BUG REPORT] IoU eval conf_matrix_ accumulation doesn't work

chengdazhi opened this issue · 2 comments

Heads up! On my machine, the line self.conf_matrix = self.conf_matrix.index_put_(tuple(idxs), self.ones, accumulate=True) does nothing for entries in conf_matrix that is above 16777216. You can try:

a = torch.Tensor([[0, 0],[0,16777216]])
print(a)
a.index_put_((torch.ones(100).long(), torch.ones(100).long()), torch.ones(100),accumulate=True)
print(a)

to see if you can reproduce. Hope you didn't use the same code for your test server.

Did you modify your conf_matrix to be float?
This is a known issue for float32, that is why the confusion matrix is long

Ah right, I was using Pytorch 1.4 and followed this comment: #22 (comment)
I should have paid attention to your reply to that comment.