Make the _export function focus on model conversion and saving, and add the saver parameter so that different model conversions in the future can also call the _export function, instead of making special behaviors due to specific conditions, but maintaining a consistent behavior pattern.
Add saver_type.py with various Saver types and Handles specific model parameters using closures.
Refactor _export function to focus on model conversion and saving, adding a saver parameter for flexibility.
Rewrite onnx_export、ckpt_export、trt_export function to utilize the updated _export function.
Update parameter names in save_net_with_metadata for better compatibility.
Types of changes
[x] Non-breaking change (fix or new feature that would not break existing functionality).
[ ] Breaking change (fix or new feature that would cause existing functionality to change).
Fixes #6375 .
Description
Make the
_export
function focus on model conversion and saving, and add the saver parameter so that different model conversions in the future can also call the_export
function, instead of making special behaviors due to specific conditions, but maintaining a consistent behavior pattern.saver_type.py
with various Saver types and Handles specific model parameters using closures._export
function to focus on model conversion and saving, adding a saver parameter for flexibility.onnx_export
、ckpt_export
、trt_export
function to utilize the updated_export
function.save_net_with_metadata
for better compatibility.Types of changes
./runtests.sh -f -u --net --coverage
../runtests.sh --quick --unittests --disttests
.make html
command in thedocs/
folder.