Open shrutishrestha opened 3 years ago
pred = prob[label, np.arange(len(label), dtype=np.int32)]
What does this line do in OhemCrossEntropy do?
https://github.com/Serge-weihao/CCNet-Pure-Pytorch/blob/ff51a27bc5e111b2e7ddc9258266a2fea4637ac6/loss/loss.py#L68 I guess that means to get the gt class related predicted score for each (valid) pixel.
pred = prob[label, np.arange(len(label), dtype=np.int32)]
What does this line do in OhemCrossEntropy do?