Welcome to our Support Center

Save ONNX File

Description

This VI exports a model to a .onnx file. The generated file can be used to initialize an inference session. If training information is included during export, the file can also be used to initialize a training session.

Input parameters

 

Model in : reference to the model to save. This is an instance of the Model class of the Deep Learning toolkit.
File Path : path, destination path for the .onnx file to be written.
save : enum,

    • Without Train Info : Exports a standard ONNX file, lightweight and compatible with inference sessions.
    • With Train Info : Embeds training-related metadata (e.g., optimizer states, momentum buffers). The file size may increase by a few KBs for metadata, or significantly more (up to ×3) if momentum data is included.

 

Output parameters

 

 Model out : output reference of the model, allowing chaining.

Example

All these exemples are snippets PNG, you can drop these Snippet onto the block diagram and get the depicted code added to your VI (Do not forget to install Deep Learning library to run it).

Table of Contents