onnx 模型转换opset version

import onnx
from onnx import version_converter, helper

# import onnxruntime
# help(onnx)

# Preprocessing: load the model to be converted.
model_path = 'old.onnx'
original_model = onnx.load(model_path)
original_model.opset_import[0].version = 11
original_model.ir_version = 6

onnx.save(original_model, "new.onnx")
# print(original_model.Version)


# print('The model before conversion:\n{}'.format(original_model))

你可能感兴趣的:(深度学习,神经网络,人工智能)