-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Fixing LP-Pooling stability issues #6766
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
Conversation
|
@pytorchbot retest this please |
|
Before you merge, please make sure that this is really desired. The hack works well in practice (at least better than having NANs), but I'm not sure if other values (-1, +1) would be better. |
|
CC @soumith |
|
I think it would be good to add a test fornthis case as well. |
|
i think this is reasonable. I've merged it. |
* Added ReLU unit to LP pooling, so the gradient does not become NAN if all inputs are zero. * Added workaround for odd p. Added a bit of doc. * Make the linter happy.
* Added ReLU unit to LP pooling, so the gradient does not become NAN if all inputs are zero. * Added workaround for odd p. Added a bit of doc. * Make the linter happy.
The gradient of LP-Pooling is undefined when the sum of all inputs to the power of
pis zero. The current implementation will yield NAN in this case.I've added a ReLU unit to set the gradient to zero if the sum of all input elements to the power of
pis zero.This would fix issue #6765.