Convert to onnx after script removal? #1540
-
I want to convert a trained model to onnx. It looks like previously there was a pytorch2onnx.py script, but it looks like this doesn't exist anymore. I assume this change was made, so that the mmdeploy repo is used instead. However it is not entirely clear to me from the docs there, how it would be used in that way. Trying to follow the steps as I understood them from the mmdeploy docs, I tried:
In particular I tried: python tools/torch2onnx.py \
configs/mmcls/classification_onnxruntime_dynamic.py \
/data/mmpretrain/work_dirs/swinv2-tiny-w16_16xb64_in1k-256px/swinv2-tiny-w16_16xb64_in1k-256px.py \
/data/mmpretrain/work_dirs/swinv2-tiny-w16_16xb64_in1k-256px/epoch_300.pth \
/data/FST/221130_person_crops/val/yellow_person/img_2022_09_14_10_31_45t578460.jpg \
--work-dir /data/mmpretrain/work_dirs/swinv2-tiny-w16_16xb64_in1k-256px I get this error Can you give me some guidance what would be intended way if I want to convert a trained model to onnx with this repo? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@christian-holland hi,could use mmdeploy after this PR open-mmlab/mmdeploy#2003 |
Beta Was this translation helpful? Give feedback.
@christian-holland hi,could use mmdeploy after this PR open-mmlab/mmdeploy#2003