hyrax.model_exporters
Attributes
Functions
|
Dispatching function to convert a ML framework model into an ONNX model. |
|
Specific implementation to convert PyTorch model to ONNX format. This |
Module Contents
- export_to_onnx(model, sample, config, ctx)[source]
Dispatching function to convert a ML framework model into an ONNX model.
- Parameters:
model (ML framework model) – The model that was just trained using the ML framework. i.e. PyTorch
sample (Tensor) – A single sample from the training data loader. This is used to check the output of the ONNX model against the output of the PyTorch model.
config (dict) – The parsed config file as a nested dict
ctx (dict) – A context dictionary containing info needed for the conversion to ONNX.