onnx.version_converter

convert_version

onnx.version_converter.convert_version(model: ModelProto, target_version: int) ModelProto[source]

Convert opset version of the ModelProto.

Parameters:
  • model – Model.

  • target_version – Target opset version.

Returns:

Converted model.

Raises:

RuntimeError when some necessary conversion is not supported.