Giter VIP home page Giter VIP logo

Comments (4)

happyharrycn avatar happyharrycn commented on June 1, 2024

Good catch! The denominator of the classification loss (Eq. 7 of our tech report) should be the number of positive samples. We will update the tech report soon.

In practice, self.loss_normalizer saves a moving average of the number of positive samples. The classification loss is summed over all samples, where the regression loss is summed over positive samples. Both are divided by self.loss_normalizer and are then added up.

from actionformer_release.

sming256 avatar sming256 commented on June 1, 2024

Thanks for the reply! The moving average normalizer is a really good trick for stabilizing small batch training!

I still want to have a further discussion about the classification loss. I guess it should be divided by the number of all samples, just like in the original focal loss, instead of only positive samples. However, I also find that if in this way (divided by a moving average of the number of all samples), the classification loss value would be small and the final detection result is poor.

So I wonder do you have any specific motivation for choosing such implementation, or just because it is a good weight for balancing the regression loss and classification loss. Please correct me if I am wrong. Thanks!

from actionformer_release.

happyharrycn avatar happyharrycn commented on June 1, 2024

Nice to have this discussion. The modern version of the focal loss (RetinaNet) uses a similar implementation, where both the classification loss (focal) and the regression loss (smoothed L1) are divided by the moving average of number of positive samples. See the code here in Detectron2. I think the choice here is mostly empirical.

from actionformer_release.

sming256 avatar sming256 commented on June 1, 2024

Good to know that! Now it is clear.

Have a nice day!

from actionformer_release.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.