-
Notifications
You must be signed in to change notification settings - Fork 456
Description
Describe the bug
The exported ONNX for centerNet ( http://download.tensorflow.org/models/object_detection/tf2/20210210/centernet_mobilenetv2fpn_512x512_coco17_kpts.tar.gz ) seems not correct.
For the original model:
we are trying to mark NaN as 0 in the sqrt output.
For the exported onnx:
seems we are fill the sqrt output with NaNs.
See below image when I tried to apply the below formulas:
- Sqrt(Negative) = NaN
- 0 * NaN = NaN
- 0 * Inf = NaN
- 1 * Inf = Inf
- a + NaN = NaN (a is normalized number in IEEE 754)
- Inf + NaN = NaN
Urgency
N/A
System information
- Linux Ubuntu 18.04
- Tensorflow Version: 2.5.0
- Python version: 3.6.9
To Reproduce
python3 -m pip install tensorflow onnxruntime
python3 -m pip install git+https://github.com/onnx/tensorflow-onnx
python3 -m tf2onnx.convert --saved-model centernet_mobilenetv2_fpn_kpts/saved_model/ --opset 13 --output centernet_mobilenetv2_fpn_kpts.onnx
using Netron to visualize the onnx.
Screenshots
N/A
Additional context
N/A