Skip to content

Gradient Exploding & LossPredLoss - MultiBoxLoss Problems #14

@zuliani99

Description

@zuliani99

Thank you for your code it has been very helpful for me, however I'm encountering some issues regarding the object detection task:

  1. If I do not insert the gradient clipping the loss will explode causing it to be nan
  2. The output of the MultiBoxLoss is a single loss of all the batch [1], whereas the output of the LossNet is [32,1], so once these input are fed to the LossPredLoss it will return always return 0.0 as final loss module

The change that I've made regarding the SSD module is that I've attached the LossNet on this class and called the forward pass on the return of the SSD forward, like so:

return output, self.loss_net(self.features), None

The None is for future work, for returning the embeddings

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions