Scripts: Information about the ONNX model's inputs and outputs

 

Information about the ONNX model's inputs and outputs:

The script obtains information about the number, types and sizes of input and output tensors in an ONNX model

Information about the ONNX model's inputs and outputs

Author: Slava

 
Automated-Trading:
Script to obtain information about the number, types and sizes of input and output tensors of the onnx model

Python code example using the onnx library to get information about the input and output tensors of an ONNX model:

Make sure you replace "path/of/model.onnx" with the path of your model's ONNX file. This code will load the ONNX model, loop through the input and output tensors and display their names, types and formats.

I hope this has helped

 

bracket missing?)

 
floston #:

bracket missing?)

No. The format has changed. The updated script is being checked by the moderator.

Here, try the updated script with iris cluster model (that's the reason for the change). Change the name to iris.onnx

Files:
iris.txt  5 kb