Hi, guys.
I have a tensor x = (a, b, c) , where a is batch, b are coord values and c is a float. I’d like to filter these values by threshold y. I’m doing this:
conf_mask = (prediction[:,:,4] > threshold_conf).float().unsqueeze(2)
prediction *= conf_mask
prediction = prediction[prediction[:,:,4] > 0]
But the tensor shapes are different (previous (a, b, c) after (b, c)). What am I wronging? In fact, I’d like to keep only the values from x that are over to threshold conf.