When ML fashions are skilled and run, the frameworks used to coach them generate the mannequin output in a format that’s particular to that framework. The framework additionally gives a runtime that may run the mannequin in a given surroundings in an optimized approach. Nevertheless, if the mannequin must be run by way of a distinct framework or in a distinct surroundings, the mannequin must be transformed to the format that the brand new framework understands. Open Neural Network Exchange (ONNX) is a framework that solves this interoperability problem. It gives a option to convert fashions from one format to a different and likewise gives a runtime that can be utilized to run the mannequin in a given surroundings.
ONNX may be regarded as an middleman illustration of the mannequin. It’s a widespread format that can be utilized to symbolize fashions skilled in numerous frameworks. ONNX gives a set of operators and information sorts which might be widespread throughout totally different frameworks. These operators can be utilized to symbolize the operations within the mannequin. The mannequin is represented as a graph the place the nodes are the operators and the sides are the tensors that circulation between the operators. The graph may be serialized right into a file that may be learn by the ONNX runtime. The ONNX runtime can then execute the mannequin on a given {hardware} platform.
Whereas not precisely just like the JVM or CLR for programming languages, ONNX is a runtime that…