Please use. NET 5,. NET 6, NET 7,. NET 8, NET Framework 4.6, NET Framework 4.61, NET Framework 4.7, NET Framework 4.72, NET Framework 4.8, NET Framework 4.81, and. NET Core 3.1 versions

Coreread_model(String, Tensor) Method

Reads models from IR / ONNX / PDPD / TF / TFLite formats.

Definition

Namespace: OpenVinoSharp
Assembly: OpenVINO_CSharp_API (in OpenVINO_CSharp_API.dll) Version: 2024.3.0.2+a9617c0f8f80882646d0eba11b88ae6cb17b3fb8
C#
public Model read_model(
	string model_path,
	Tensor weights
)

Parameters

model_path  String
String with a model in IR / ONNX / PDPD / TF / TFLite format.
weights  Tensor
Shared pointer to a constant tensor with weights.

Return Value

Model
A model.

Remarks

Created model object shares the weights with the @p weights object. Thus, do not create @p weights on temporary data that can be freed later, since the model constant data will point to an invalid memory.

See Also