equinox icon indicating copy to clipboard operation
equinox copied to clipboard

[Feature Request] Allow to specify `Conv` padding by strings

Open ChenAo-Phys opened this issue 5 months ago • 9 comments

Hello! I hope to specify the padding in Conv by strings like 'SAME' or 'VALID'. This is compatible with jax API since it's already implemented in jax.lax.conv_general_dilated.

Furthermore, I also would like to have a 'CIRCULAR' padding which is not in jax.lax.conv_general_dilated but implemented in flax and pytorch. In the 1D case, for instance, this padding behaves as x[L + i] = x[i] so that the chain becomes effectively a ring. This is particularly helpful in some physical systems.

I can propose a PR if you think these changes are suitable. Thanks!

ChenAo-Phys avatar Jan 11 '24 15:01 ChenAo-Phys