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

Resizing layer meets division by zero crash with jax backend #19725

Open
AGFACBNNR opened this issue May 17, 2024 · 2 comments
Open

Resizing layer meets division by zero crash with jax backend #19725

AGFACBNNR opened this issue May 17, 2024 · 2 comments

Comments

@AGFACBNNR
Copy link

As shown in this colab, Resizing meets a 'division by zero' crash with jax backend.
This is triggered when 'height' is large and crop_to_aspect_ratio=True.
According to the error message, it seems that after the preprocessing in Keras, jax receives an image whose dimension list contains a zero, which is directly used as a divisor in jax.
Currently the output is:
1715930082639
where we can observe that the API can execute successfully when crop_to_aspect_ratio=False or 'height' is small, while meets a crash in the third time.

@AGFACBNNR
Copy link
Author

The symptom looks similar to issue #19723, but I'm not sure whether the reasons behind are same too.
Besides, I also found this problem in RandomCrop layer.
Please let me know if you need a code snippet to reproduce the crash in RandomCrop.

@mehtamansi29 mehtamansi29 self-assigned this May 21, 2024
@mehtamansi29
Copy link
Collaborator

Hi @AGFACBNNR

Thanks for reporting the issue. I have tested the code snippet and reproduces the reported behaviour. Attached gist file for reference.

We will look into the issue and update you the same.

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

No branches or pull requests

3 participants