Giter Club home page Giter Club logo

Comments (8)

richardaecn avatar richardaecn commented on May 24, 2024 11

Hi @bei-startdt

Thanks for pointing this out! The implementation you mentioned is not very numerically stable (same for the implementation in https://github.com/tensorflow/tpu/blob/master/models/official/retinanet/retinanet_model.py#L130-L162). When gamma is small (< 1), there might be NaN occurs during back-propagation.

The full derivation can be found in the figure below. Hope this will help!
img_3584

from class-balanced-loss.

bei-startdt avatar bei-startdt commented on May 24, 2024

Thanks a lot!

from class-balanced-loss.

Angzz avatar Angzz commented on May 24, 2024

@richardaecn Hi,have you experiment on detection datasets such as coco, and the results?

from class-balanced-loss.

richardaecn avatar richardaecn commented on May 24, 2024

Hi @Angzz , we haven't tried it on detection datasets.

from class-balanced-loss.

XCRobert avatar XCRobert commented on May 24, 2024

@richardaecn Hi , have you compared the class balanced focal loss with the orignal focal loss using resnet 50 or 101 ? When did such comparsion , you used resnet 32 in your paper. Will stronger networks weaken the framework you proposed ?

from class-balanced-loss.

shawnthu avatar shawnthu commented on May 24, 2024

modulator = tf.exp(-gamma * labels * logits - gamma * tf.log1p( tf.exp(-1.0 * logits)))
should be
modulator = tf.exp(-gamma * labels * logits - gamma * tf.log1p( tf.exp(-1.0 * labels * logits)))
labels in {-1, 1}

from class-balanced-loss.

richardaecn avatar richardaecn commented on May 24, 2024

Hi @shawnthu, in the formulation, we are using 1 for positive labels and 0 for negative labels.

from class-balanced-loss.

shawnthu avatar shawnthu commented on May 24, 2024

Hi @shawnthu, in the formulation, we are using 1 for positive labels and 0 for negative labels.

in fact we are both right, but your solution more concise (^o^)/~

from class-balanced-loss.

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.