xboot / libonnx

A lightweight, portable pure C99 onnx inference engine for embedded devices with hardware acceleration support.
MIT License
586 stars 108 forks source link

[Clip]correct min input default value #13

Closed beru closed 3 years ago

beru commented 3 years ago

Hi, this PR corrects Clip operator's default values of min input.

Originally, FLT_MIN and DBL_MIN are used but they are for minimum positive values.

ONNX spec says They default to numeric_limits::lowest() and numeric_limits::max().

https://github.com/onnx/onnx/blob/master/docs/Operators.md#Clip

https://stackoverflow.com/a/2684773/4699324