-
-
Notifications
You must be signed in to change notification settings - Fork 609
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
ConvTranspose errors with symmetric non-constant pad #2424
Labels
Comments
paulnovo
added a commit
to paulnovo/Flux.jl
that referenced
this issue
Jun 22, 2024
The ConvTranspose was not able to handle symmetric non-constant padding (ie, `pad=(1, 0)` for 2D ConvTranspose). Constant padding (ie `pad=1` for 2D ConvTranspose) and assymetric non-constant padding (ie, `pad=(1, 0, 2, 3)`) worked correctly. This commit fixes symmetric non-constant padding and adds unit tests to ensure it produces the same output size as an equivalent fully expanded padding. Fixes FluxML#2424
3 tasks
paulnovo
added a commit
to paulnovo/Flux.jl
that referenced
this issue
Jun 30, 2024
The ConvTranspose was not able to handle symmetric non-constant padding (ie, `pad=(1, 0)` for 2D ConvTranspose). Constant padding (ie `pad=1` for 2D ConvTranspose) and assymetric non-constant padding (ie, `pad=(1, 0, 2, 3)`) worked correctly. This commit fixes symmetric non-constant padding and adds unit tests to ensure it produces the same output size as an equivalent fully expanded padding. Fixes FluxML#2424
3 tasks
paulnovo
added a commit
to paulnovo/Flux.jl
that referenced
this issue
Jul 28, 2024
The ConvTranspose was not able to handle symmetric non-constant padding (ie, `pad=(1, 0)` for 2D ConvTranspose). Constant padding (ie `pad=1` for 2D ConvTranspose) and assymetric non-constant padding (ie, `pad=(1, 0, 2, 3)`) worked correctly. This commit fixes symmetric non-constant padding and adds unit tests to ensure it produces the same output size as an equivalent fully expanded padding. Fixes FluxML#2424
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The
ConvTranspose
layer errors if given a symmetric non-constant pad (that is,length(pad) == ndims(w) - 2
), whereaspad::Int
(constant pad) andlength(pad) == 2 * (ndims(w) - 2)
(non-symmetric non-constant pad) work fine.MWE:
errors with
Environment
The above reproducer works in Julia 1.10.2 on a fresh environment
Suggestion
I suspect the problem is in
combined_pad
(here and here). It assumes thatc.pad
has length2 * (ndims(c.weight) - 2)
, which is not the case.The text was updated successfully, but these errors were encountered: