About loss_c in Multibox Loss
See original GitHub issueHi~
loss_c = log_sum_exp(batch_conf) - batch_conf.gather(1, conf_t.view(-1,1))
https://github.com/lzx1413/PytorchSSD/blob/cd5776d7dd348f9c6a996cec8accf749e0bffee0/layers/modules/multibox_loss.py#L93
This operation seems to me that same as to calculate the softmax cross entropy loss, so why not use torch.nn.functional.cross_entropy
after softmax directly?
ps. +x_max
and -x_max
https://github.com/lzx1413/PytorchSSD/blob/cd5776d7dd348f9c6a996cec8accf749e0bffee0/utils/box_utils.py#L274 in log_sum_exp seems do nothing either.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Can someone give me an explanation for Multibox loss ...
Confidence loss is a categorical cross-entropy loss for classifying the detected objects. The purpose of this term is to make sure that correct ......
Read more >Understanding SSD MultiBox — Real-Time Object ...
At the end, MultiBox only retains the top K predictions that have minimised both location (LOC) and confidence (CONF) losses.
Read more >14.7. Single Shot Multibox Detection
Object detection has two types of losses. The first loss concerns classes of anchor boxes: its computation can simply reuse the cross-entropy loss...
Read more >Real-time object detection: Understanding SSD
The loss function used is the MultiBox loss, which consists of two terms: the confidence loss and the localization loss.
Read more >SSD - Artificial Inteligence
Multibox Loss Function. During training we minimize a combined ... Sum of losses: L(x,c,l,g) = (Lconf(x, c) + αLloc(x,l,g)) / N. . N...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can calculate the softmax loss once and generate a mask for postive instances and hard negtive instances. Then you can multiply them together to generate the valuable loss.
Thank you.