Replies: 1 comment
-
Pytorch's cross_entropy function already contains a softmax itself: https://pytorch.org/docs/stable/generated/torch.nn.CrossEntropyLoss.html#torch.nn.CrossEntropyLoss |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm studying the way keypoint detection is implemented in detectron2 compared to maskrcnn paper.
maskrcnn authors: "we minimize the cross-entropy loss over an m2 -way softmax output (which encourages a single point to be detected)"
but it looks like in detectron2 :
the loss is a simple cross entropy over the mask:
https://github.com/facebookresearch/detectron2/blob/main/detectron2/modeling/roi_heads/keypoint_head.py#L88
And then the softmax is applied later only to get the keypoint score:
https://github.com/facebookresearch/detectron2/blob/main/detectron2/structures/keypoints.py#L218
Then there is slight discrepency with the paper, Am I correct ? Is there a reason ? Maybe it works better that way ?
Beta Was this translation helpful? Give feedback.
All reactions