Welcome to our Support Center

Convert Keras To ONNX

Description

This VI transforms a .keras model file (in the new Keras v3 format) into a standard .onnx file using a Python conversion tool. It enables deployment of Keras models across ONNX-compatible environments. Optionally, the resulting file can be opened in Netron.

Input parameters

 

 Open Netron : boolean, indicating whether to automatically open the resulting ONNX file in Netron after conversion. If true opens in Netron else conversion only.
Keras Model Path : path, path to the input .keras file containing the model to convert. This format is the new native Keras v3 serialization (replacing .h5).
ONNX Model Path : path, path to the output .onnx file where the converted model will be saved.

 

Output parameters

 

 standard output : string, text output from the underlying Python process. Can include logs, conversion info, or warnings.
 standard error : string, text output capturing any error messages from the Python process, useful for debugging failed conversions.

 

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