RSS 2019-08 - 1/1 Blog onnx (8) runtime (3)


2019-08 - 1/1#

Float, double with ONNX#

2019-08-23

Replicating what a library does, scikit-learn for example, is different from implementing a function defined in a paper. Every trick needs to be replicated. scikit-learn trees implement a prediction function which takes float features and compares them to double thresholds. Knowning the ONNX assumes that comparison only happens numbers of the same type, you end up with discrepencies.

post

ONNX updates#

2019-08-02

The python runtime is now almost complete for all the supported numerical operator implemented in sklearn-onnx. A couple of notebooks introduces a couple of way to investigates issues, to benchmark ONNX models with onnxruntime or python runtime, to check the differences between the same model. It also extend ONNX with operators not in the specification to experiment some assumptions and check it is more efficient. Notebook Precision loss due to float32 conversion with ONNX introduces a way to guess the margins introduced by the conversion from double to single. There also exists a function to convert numpy function into ONNX (see Create custom ONNX graphs with AST). Its coverage is probably low but it will improve.

post


RSS 2019-08 - 1/1 2020-11 (1) 2021-05 (2) 2021-07 (2) 2021-08 (3) 2022-02 (1)