Giter Club home page Giter Club logo

Comments (3)

f-dangel avatar f-dangel commented on July 17, 2024 1

Hi Alex,

I rolled out support for BCEWithLogitsLoss, the binary equivalent of CrossEntropyLoss, in most extensions (#279, #280, #282, #283, #284). I was favoring BCEWithLogitsLoss over BCELoss because Fisher = GGN for the former.

Feel free to close this issue if you believe it to be solved.

from backpack.

fKunstner avatar fKunstner commented on July 17, 2024

Hi Alex, thanks for the report!

MSELoss not supporting vectors is annoying if it clashes with the standard pytorch API. I'll try to look into it.

There's no technical reason for BCELoss to be missing. It's not on the priority list as CrossEntropyLoss is more general. The difference in running time would not be noticable (compared to the rest of the model) and they would give the same output as it's a reparametrization (up to floating point precision).

from backpack.

aleximmer avatar aleximmer commented on July 17, 2024

To have BCELoss included, one would need to extend the loss function and provide the second-derivatives and some other quantities I guess? Maybe I might give it a shot sometime.
I understand why it doesn't make much sense to assign high priority to it as it though is indeed almost the same as softmax for two classes.

The MSELoss problem is not so bad and can simply be avoided by reshaping the labels from N-dimensional vector to a[N,1] matrix.

from backpack.

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.