onnx删除输出

import onnx
from onnx import helper
model = onnx.load("nnunet.onnx")

node  = model.graph.node
out = model.graph.output


# for i in range(len(node)):
# 	print(node[i])
#
# for i in range(len(node)):
#     if node[i].op_type == 'Conv':
#         node_rise = node[i]
#         if node_rise.output[0] == '137':
#             print(i)  #



# del node[0]
# del out[1]
onnx.save(model, '11111111nnunet.onnx')
print("OK")

你可能感兴趣的:(深度学习,tensorflow,人工智能)