Skip to content

Latest commit

 

History

History
41 lines (26 loc) · 1.33 KB

Onnx.md

File metadata and controls

41 lines (26 loc) · 1.33 KB

NeoOnnx Library

The NeoOnnx library lets you load third-party neural networks serialized in ONNX format.

API

Import a network

#include <NeoOnnx/NeoOnnx.h>

NEOONNX_API void LoadFromOnnx( const char* fileName, NeoML::CDnn& dnn );
NEOONNX_API void LoadFromOnnx( const void* buffer, int bufferSize, NeoML::CDnn& dnn );

Loads a network from a file or a buffer.

For each network input the dnn network will have a CSourceLayer with the same name. For each source layer a blob of the size specified in the ONNX model will be allocated. The inputs with initializers will be ignored and the initializer values will be loaded directly.

For each network output the dnn network will have a CSinkLayer with the same name.

Build

The library will be built automatically together with NeoML.

Implementation

We use the ONNX opset version 9, supporting the main convolutional neural network operations, LSTM, and most activation functions.

Mobile support

See the methods that load ONNX models in Objective-C and Java interfaces.