Describe the bug
I was converting a keras to ONNX through one library (tf2onnx)[https://github.com/onnx/tensorflow-onnx], however, I find out that: when giving a NaN input, onnxruntime will correctly output NaN in CPU mode while output normal value in GPU mode. After some debugging, I find out this inconsistency happens when I set the activation of dense to be relu. Specifically, the simplest graph that can trigger this bug is as follows:
Describe the bug I was converting a keras to ONNX through one library (tf2onnx)[https://github.com/onnx/tensorflow-onnx], however, I find out that: when giving a NaN input,
onnxruntime
will correctly outputNaN
in CPU mode while output normal value in GPU mode. After some debugging, I find out this inconsistency happens when I set the activation of dense to berelu
. Specifically, the simplest graph that can trigger this bug is as follows:To Reproduce
Expected behavior Same as executing on CPU mode,
onnxruntime
should also output NaN when executing on GPU modeScreenshots