BEVFormer_tensorrt
BEVFormer_tensorrt copied to clipboard
can not use onnxsim
code:
import os import onnx import torch from onnxsim import simplify
onnx_file = "checkpoints/onnx/bevformer_tiny_epoch_24_cp.onnx" onnx_sim_path = onnx_file.replace(".onnx", "_sim.onnx") model = onnx.load(onnx_file) model_sim, check = simplify(model) assert check, "Simplified ONNX model could not be validated" onnx.save(model_sim, onnx_sim_path)
The custom plugins are only for TensorRT. They don't support ONNXRuntime.
Do you have any experience or suggestion if I want to use onnxsim?
You can use the cfg without custom plugins.