I have two arrays (gt and pred) with values ranging from 0 to 4.
The shape of these two arrays is (1, 1, 93, 349, 219). My target is to create a mask to ignore and multiplying it into gt and pred to ignore the value in two arrays. However, I am facing an issue
ignore_value=4
if ignore_value is not None:
mask[gt!=ignore_value]=1 # ignore value mask
gt=mask*gt
pred=mask*pred # ignore value mask for pred
print "after removing ignore value: ", np.unique(gt),np.unique(pred)
output: after removing ignore value: [0 1 2 3] [0 1 2 3 4]
why it is not removing the ignore value in pred?
mask?mask=np.zeros(gt.shape, dtype=np.int32)