2021-12-03 15:12:40 +08:00
|
|
|
## Introduction of mmcv.onnx module
|
2020-12-31 19:16:48 +08:00
|
|
|
|
2022-03-01 15:07:07 +08:00
|
|
|
### <span style="color:red">DeprecationWarning</span>
|
|
|
|
|
|
|
|
ONNX support will be deprecated in the future.
|
|
|
|
Welcome to use the unified model deployment toolbox MMDeploy: https://github.com/open-mmlab/mmdeploy
|
|
|
|
|
2021-09-24 16:57:20 +08:00
|
|
|
### register_extra_symbolics
|
2020-12-31 19:16:48 +08:00
|
|
|
|
|
|
|
Some extra symbolic functions need to be registered before exporting PyTorch model to ONNX.
|
|
|
|
|
2021-09-24 16:57:20 +08:00
|
|
|
#### Example
|
2020-12-31 19:16:48 +08:00
|
|
|
|
|
|
|
```python
|
|
|
|
import mmcv
|
|
|
|
from mmcv.onnx import register_extra_symbolics
|
|
|
|
|
|
|
|
opset_version = 11
|
|
|
|
register_extra_symbolics(opset_version)
|
|
|
|
```
|
|
|
|
|
2021-12-03 15:12:40 +08:00
|
|
|
#### Reminder
|
|
|
|
|
|
|
|
- *Please note that this feature is experimental and may change in the future.*
|
|
|
|
|
2021-09-24 16:57:20 +08:00
|
|
|
#### FAQs
|
2020-12-31 19:16:48 +08:00
|
|
|
|
|
|
|
- None
|