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

Pretrained NASNetMobile incorrect inference with torch backend #18451

Open
fchollet opened this issue Jun 17, 2023 · 3 comments
Open

Pretrained NASNetMobile incorrect inference with torch backend #18451

fchollet opened this issue Jun 17, 2023 · 3 comments
Labels

Comments

@fchollet
Copy link
Collaborator

All Keras Applications work correctly with the torch backend except NASNetMobile. It runs, but its predictions are incorrect. To investigate.

@chenmoneygithub
Copy link
Contributor

Looked into the issue, seems the forward pass produces numerical diff: https://colab.research.google.com/gist/chenmoneygithub/5d8b8f508763f603c5d39df2f52b0084/test-keras-core-nasnet.ipynb

@chenmoneygithub
Copy link
Contributor

The problem is Nasnet uses average pooling + same padding, which is not well supported in torch backend.

@fchollet
Copy link
Collaborator Author

With a random input in your Colab the numerical diff looks fairly small, but in practice with real-world images it invalidates the predicted classes entirely, which means we won't be able to make the model available for torch.

@fchollet fchollet transferred this issue from keras-team/keras-core Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants