helios.onnx =========== .. py:module:: helios.onnx Functions --------- .. autoapisummary:: helios.onnx.export_to_onnx Module Contents --------------- .. py:function:: export_to_onnx(net: torch.nn.Module, net_args: torch.Tensor, out_path: pathlib.Path, validate_output: bool = False, rtol: float = 0.001, atol: float = 1e-05, **kwargs) -> None Export the given network to ONNX format. By default, the resulting onnx network will be validated through ONNX to ensure it's valid. If you wish to validate the traced outputs to ensure they're the same, set ``validate_output`` to true and change ``rtol``/``atol`` as needed. :param net: the network to convert. :param net_args: the input tensor for tracing. :param out_path: the path to save the exported network to. :param validate_output: if true, validation is performed to ensure correctness. Defaults to false. :param rtol: relative tolerance threshold. Defaults to ``1e-3``. :param atol: absolute tolerance threshold. Defaults to ``1e-5``. :param kwargs: additional keyword arguments to ``torch.onnx.export``.