Closed HansBambel closed 4 years ago
Hey Ya, that's a mistake. But it turns out that it still works as expected due to numpy's fancy/advanced indexing; turn out the for loop is not even needed the code can be simply:
conf_matrix[:, self.ignore_index] = 0
conf_matrix[self.ignore_index, :] = 0
self.ignore_index
is always a tuple
and fancy indexing will select the rows/columns inside the tuple
.
Thanks for bringing it up! I removed the loop from the code.
Hey! First of all: Thank you for the repository! I have been looking for quite a while to get a nice (performant) way to calculate the meanIoU over batches.
I noticed that in
iou.py
you are looping ofer the indices that you want to set to0
, but you don't use the looping variable:It should be this instead, right?