Optimize mlir2onnx.py so that *_final.mlir can be converted to .pb file and visualized in Netron.
The main difference between *.mlir and *_final.mlir is the latter contains information of the subnet and layer group.
Source Code Path:
tpu-mlir/python/tools/mlir2onnx.py
To test:
$ cd tpu-mlir/regression
$ ./run_model.sh resnet50_tf
$ mlir2onnx.py -m regression_out/resnet50_tf_bm1684x/resnet50_tf_bm1684x_int8_asym_final.mlir -o resnet50_tf_final.pb
Bonus: 500pt