ovr-cnn
ovr-cnn copied to clipboard
a question about loss for background
❓ Questions and Help
Hi
In your paper of Equation 6, you build the supervised loss for regions. I'm curious whether for the background regions, the numerator of Equation 6 should be 1, while the denominator reminds the same. Besides, I do not find the implementation of this part in your code. Could you point it out for me for further reference?
Thanks
Hi Yunsheng,
Thanks for your comment. The loss is a regular CrossEntropyLoss
, and does not need a custom implementation. The only difference is how the logits are computed. In open-vocabulary settings, we set the background embedding to an all-zero vector here. This means the exponential of dot product between background weights and any input will be exactly 1. Hence you are right, the numerator will be 1.