10 lines
321 B
Python
10 lines
321 B
Python
# check_onnx.py
|
|
import onnx
|
|
m = onnx.load("/data6/zhangw/yolov5/runs/train/YNDC_20251010_yolov5_optimize/weights/best.onnx") # 改成你的onnx路径
|
|
print("Graph outputs:")
|
|
for o in m.graph.output:
|
|
print(o.name, o.type)
|
|
print("\nGraph nodes:")
|
|
for n in m.graph.node:
|
|
print(n.op_type, n.name if n.name else "")
|