bevfusion icon indicating copy to clipboard operation
bevfusion copied to clipboard

How to export a trained model to ONNX format

Open MaxLeo-LMZ opened this issue 1 year ago • 0 comments

I used tool/export.py to try to export my trained model epoch_6.pth. However, the following problems are encountered: python tools/export.py configs/nuscenes/det/transfusion/secfpn/camera+lidar/swint_v0p075/convfuser.yaml output/bev_ result/epoch_6.pth

Traceback (most recent call last): File "tools/export.py", line 117, in main() File "tools/export.py", line 53, in main if isinstance(cfg.data.test, dict): File "/home/mingzhong/anaconda3/envs/bevfusion/lib/python3.8/site-packages/mmcv/utils/config.py", line 507, in getattr return getattr(self._cfg_dict, name) File "/home/mingzhong/anaconda3/envs/bevfusion/lib/python3.8/site-packages/mmcv/utils/config.py", line 48, in getattr raise ex AttributeError: 'ConfigDict' object has no attribute 'data'

I think I may be using an inappropriate configuration file, has anyone used tools/export.py?

Does anyone know how to export a trained model to ONNX format?

MaxLeo-LMZ avatar Aug 21 '23 07:08 MaxLeo-LMZ