Comments (3)
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.
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.
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)
- Extending `BCEWithLogitsLoss` to non-binary labels
- [Feature Request] Levenberg Marquardt HOT 1
- cannot import backpack nor extend HOT 9
- Are customized loss functions supported? HOT 10
- Optimizing the locations of the Jacobians HOT 5
- add support for torch 2.0? HOT 7
- Encountered node that may break second-order extensions HOT 2
- Second order extension HOT 2
- Container modules with advanced control flow & modules with multiple inputs HOT 23
- torch version < 2.x in `setup.cfg` HOT 2
- AdaptiveAvgPool not supported for 2nd order derivatives? HOT 4
- Missing implementation of supported layers for DiagHessian and BatchDiagHessian
- Facing error while Using DiagHessian for torchvision.models.resnet18 HOT 1
- Feature for backpack on VAEs HOT 2
- Extend backpack to deal with weighted sums HOT 14
- Missing Support for BatchNorm and AdaptiveAvgPool in HBP methods (KFAC, KFRA, KFLR) and GGNMP HOT 8
- Second Order Extensions for Custom Loss Modules HOT 8
- BackPACK with simple attention and additional layers HOT 1
- Feature request: `BatchL2Grad` for `LayerNorm`
- Request: Extension for GroupNorm HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from backpack.