onnx_light.onnx.version_converter#

onnx_light.onnx.version_converter.convert_version(model: ModelProto, target_version: int) ModelProto#

Converts the model to the given target opset version.

Parameters:
  • model – The input ModelProto to convert.

  • target_version – The target opset version for the ai.onnx domain.

Returns:

A new ModelProto converted to the target opset version.

Raises:

ConvertError – If the conversion cannot be completed.