equinox
equinox copied to clipboard
[Feature Request] Allow to specify `Conv` padding by strings
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!