ReadOnnxModel
Function Syntax
This function returns outputOnnxModel.
// Function prototype
OnnxModel::Ptr readOnnxModel( const std::string& filePath, OnnxModel::Ptr outputOnnxModel = nullptr );
This function returns outputOnnxModel.
// Function prototype. read_onnx_model(file_path: str = "", output_onnx_model: Union[Any, None] = None) -> OnnxModel
This function returns outputOnnxModel.
// Function prototype. public static OnnxModel ReadOnnxModel( String filePath = "", OnnxModel outputOnnxModel = null );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
![]() |
filePath |
The path of the ONNX model file. | String | "" | |
![]() |
outputOnnxModel |
The Object containing the ONNX model. | OnnxModel | nullptr |
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
![]() |
file_path |
The path of the ONNX model file. | string | "" | |
![]() |
output_onnx_model |
The Object containing the ONNX model. | OnnxModel | None |
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
![]() |
filePath |
The path of the ONNX model file. | String | "" | |
![]() |
outputOnnxModel |
The Object containing the ONNX model. | OnnxModel | null |
Object Examples
ReadOnnxModel readOnnxModelAlgo; readOnnxModelAlgo.setFilePath( std::string( IMAGEDEVDATA_OBJECTS_FOLDER ) + "noise2noise.onnx" ); readOnnxModelAlgo.execute(); std::cout << "inputCount: " << readOnnxModelAlgo.outputOnnxModel()->inputCount( ) ;
read_onnx_model_algo = imagedev.ReadOnnxModel() read_onnx_model_algo.file_path = imagedev_data.get_object_path("noise2noise.onnx") read_onnx_model_algo.execute() print("inputCount: ", str(read_onnx_model_algo.output_onnx_model.input_count()))
ReadOnnxModel readOnnxModelAlgo = new ReadOnnxModel { filePath = @"Data/objects/noise2noise.onnx" }; readOnnxModelAlgo.Execute(); Console.WriteLine( "inputCount: " + readOnnxModelAlgo.outputOnnxModel.inputCount( ) );
Function Examples
auto result = readOnnxModel( std::string( IMAGEDEVDATA_OBJECTS_FOLDER ) + "noise2noise.onnx" ); std::cout << "inputCount: " << result->inputCount( ) ;
result = imagedev.read_onnx_model(imagedev_data.get_object_path("noise2noise.onnx")) print("inputCount: ", str(result.input_count()))
OnnxModel result = Processing.ReadOnnxModel( @"Data/objects/noise2noise.onnx" ); Console.WriteLine( "inputCount: " + result.inputCount( ) );
© 2025 Thermo Fisher Scientific Inc. All rights reserved.