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
We are trying to convert Revcol to TensorRT format, but when converting to ONNX, we found that when using save_memory=True, the conversion does not work properly.
Here is our conversion test code:
When save_memory=True, the following error occurs:
File [d:\SoftWare\anaconda3\envs\torch\lib\site-packages\torch\onnx\utils.py:506](file:///D:/SoftWare/anaconda3/envs/torch/lib/site-packages/torch/onnx/utils.py:506), inexport(model, args, f, export_params, verbose, training, input_names, output_names, operator_export_type, opset_version, do_constant_folding, dynamic_axes, keep_initializers_as_inputs, custom_opsets, export_modules_as_functions)
188 @_beartype.beartype189defexport(
190model: Union[torch.nn.Module, torch.jit.ScriptModule, torch.jit.ScriptFunction],
(...)
206export_modules_as_functions: Union[bool, Collection[Type[torch.nn.Module]]] =False,
207 ) ->None:
208r"""Exports a model into ONNX format.
209
210 If ``model`` is not a :class:`torch.jit.ScriptModule` nor a
(...)
503 All errors are subclasses of :class:`errors.OnnxExporterError`.
...
511 '(vmap, grad, jvp, jacrev, ...), it must override the setup_context '
512 'staticmethod. For more details, please see '
513 'https://pytorch.org/docs/master/notes/extending.func.html')
RuntimeError: invalid unordered_map<K, T> key
If you add the following code, the export will work, but you should not be able to take advantage of the low memory footprint of Reversible Net.
Do you use ONNX in inference? You can set save_memory = False when converting the weight, then set save_memory = True in later inference. Low memory footprint only benefits the training process.
We are trying to convert Revcol to
TensorRT
format, but when converting toONNX
, we found that when usingsave_memory=True
, the conversion does not work properly.Here is our conversion test code:
When save_memory=True, the following error occurs:
If you add the following code, the export will work, but you should not be able to take advantage of the low memory footprint of Reversible Net.
Is there any relevant solution?
The text was updated successfully, but these errors were encountered: