-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metrics error due to inplace operation, "computation has been modified by an inplace operation". #2862
Comments
Hi! thanks for your contribution!, great first issue! |
cc @Diuven , I think you introduced in-place ops for speed-up, right? |
Yeah, you're right. I think this is because of the This is a quick PR fixing this issue. If you may, please check the code still gives the issue. Sorry for the inconvenience! |
* Faster classfication stats * Faster accuracy metric * minor change on cls metric * Add out-of-bound class clamping * Add more tests and minor fixes * Resolve code style warning * Update for #2781 * hotfix * Update pytorch_lightning/metrics/functional/classification.py Co-authored-by: Jirka Borovec <[email protected]> * Update about conversation * Add docstring on stat_scores_multiple_classes * Fixing #2862 Co-authored-by: Younghun Roh <[email protected]> Co-authored-by: Jirka Borovec <[email protected]>
Great, It runs without any error, now. Thanks for the hotfix. 👍 |
Hey, @williamFalcon, I got a new error since I upgraded the library today.
I used the accuracy metric, but got an error.
Code sample:
Error msg:
Can be solved using
.clone()
method.However, when I clone the
y
before feeding to the accuracy function, no error was shown.But, it's inconvenience if user has to do it manually, isn't it?
Actually, I can use the code above without
clone
before I upgrade to the latest. So, it might due to the latest update/rebase causing this error.The text was updated successfully, but these errors were encountered: