question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

About loss_c in Multibox Loss

See original GitHub issue

Hi~ 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_maxhttps://github.com/lzx1413/PytorchSSD/blob/cd5776d7dd348f9c6a996cec8accf749e0bffee0/utils/box_utils.py#L274 in log_sum_exp seems do nothing either.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lzx1413commented, Aug 30, 2018

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.

0reactions
hellojialeecommented, Aug 30, 2018

Thank you.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found