-
Notifications
You must be signed in to change notification settings - Fork 102
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
Fixed nn.functional.pad constant mode #249
Conversation
Description: - Fixed nn.functional.pad constant mode - Updated tests
@zou3519 please review this PR as well. Thanks |
Sorry, I don't understand why UNARY_POINTWISE doesn't support bdim > 0 🤔 Oh, is it specifically that for But LGTM and passes the tests :) |
yes. The padding argument is a list of pads for the last dimensions. For example, Now, if your batch dimension is in the middle (e.g. |
Description:
The issue was with the fact that
UNARY_POINTWISE
does not properly handle bdim > 0. The fix is to use a macro which explicitly callsmoveBatchDimToFront
.Related to #240