Skip to content
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

Kernel filtering not correctly replicated #144

Open
TerrestrialEclipse opened this issue Sep 24, 2021 · 1 comment
Open

Kernel filtering not correctly replicated #144

TerrestrialEclipse opened this issue Sep 24, 2021 · 1 comment

Comments

@TerrestrialEclipse
Copy link

Keras and Pytorch apply kernels differently:

  • Keras cuts off the filter kernel at the edges
  • Pytorch implicitly invokes zero padding to apply the whole filter kernel on the padded image

This could potentially be solved by encoding the intended kernel filtering behavior into the intermediate format. This also involves adapting the backends.

@pg020196
Copy link
Owner

pg020196 commented Oct 4, 2021

Hi @TerrestrialEclipse,

thank you for pointing to this issue. In order to resolve this, I would agree to extend the intermediate format with an additional property for the kernel filtering behaviour, as you proposed in your initial post.
This would result in simply setting the new property in the keras frontend and adjusting the backends accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants