You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The _export function in the bundle script is for converting models from one format to another one, e.g. converting a pytorch model to a torchscript model. It takes a converter and a model as inputs, converts the given model with the converter and save the converted model to a given path.
However, the saving logic in the _export function just suits to save the torchscript model. Given a converter which exports a torchsciprt model to an onnx model, this logic would fail to save the model. To make the _export function more general, a saver which takes model, savepath, extra_kwargs, should be passed to it instead of the current saving logic.
Describe the solution you'd like
Add a saver to the input parameters of the _export function.
Replace the current saving logic in the _export function with a call of the saver.
Use the _export function to rewrite the onnx_export function.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The _export function in the bundle script is for converting models from one format to another one, e.g. converting a pytorch model to a torchscript model. It takes a converter and a model as inputs, converts the given model with the converter and save the converted model to a given path.
However, the saving logic in the
_export
function just suits to save the torchscript model. Given a converter which exports a torchsciprt model to an onnx model, this logic would fail to save the model. To make the_export
function more general, a saver which takesmodel, savepath, extra_kwargs
, should be passed to it instead of the current saving logic.Describe the solution you'd like
Add a
saver
to the input parameters of the_export
function.Replace the current saving logic in the
_export
function with a call of thesaver
.Use the
_export
function to rewrite theonnx_export
function.Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: