-
How to implement PyTorch's nn.MaxPool2d(2, 1, ceil_mode=True) in Burn? Since PaddingConfig::Same does not support asymmetric padding, how to resolve this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I'm afraid this is not currently supported, iirc In the meantime, you might be able to manually pad the input with |
Beta Was this translation helpful? Give feedback.
-
Thank you for taking the time to respond。 |
Beta Was this translation helpful? Give feedback.
I'm afraid this is not currently supported, iirc
ceil_mode
might add padding to the right and down of the input (asymmetric, as you point out). So there are two parts to this: 1) asymmetric padding and 2)ceil_mode
, both of which are not currently implemented. Asymmetric padding support has to come first (#2676), but feel free to open an issue for ceil mode!In the meantime, you might be able to manually pad the input with
tensor.pad((left, right, top, bottom), value)
before applying the maxpool.