Open AGFACBNNR opened 2 weeks ago
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.
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.
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: 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.