Description
With x2 is nan and openvino backend, arctan2 still returns non-nan results though it should be nan (the results are nan with other backend and np.arctan2).
Please use this example to replicate the problem:
import os
os.environ["KERAS_BACKEND"] = "openvino"
from keras.src.ops import numpy as knp
import numpy as np
out1 = knp.arctan2(1.0, np.nan)
print(out1.numpy())
# 1.5703125
out2 = np.arctan2(1.0, np.nan)
print(out2)
# NaN
Environment
- Keras: 3.13.1
- Python: 3.11
- OS: macOS