# tensorplay.onnx.export Source: https://www.tensorplay.cn/docs/generated/tensorplay.onnx.export.html ```python tensorplay.onnx.export(exported_program: ExportedProgram | Any, f: Any = None, *, input_names: Sequence[str] | None = None, output_names: Sequence[str] | None = None, opset_version: int | None = None, dynamic_axes: Mapping[str, Mapping[int, str] | Sequence[int]] | None = None, do_constant_folding: bool = True, verify: bool = False, rtol: float = 0.0001, atol: float = 1e-05, external_data: bool | None = None, external_data_location: str | None = None, check_model: bool = True) → Any ``` Export a TensorPlay model to ONNX. Parameters: - exported_program – an [ExportedProgram](/docs/generated/tensorplay.export.ExportedProgram.html#tensorplay.export.ExportedProgram), or a (model, *args, kwargs) sequence captured on the fly. - f – file path or writable binary file object. When omitted the ModelProto is returned instead of being written. - input_names – names for the graph inputs, in placeholder order. - output_names – names for the graph outputs. - opset_version – target ONNX opset (default 18, minimum 13). - dynamic_axes – {value_name: {axis: axis_name}} (or a list of axis indices) marking dimensions that vary at runtime. Applies to both inputs and outputs. - do_constant_folding – fold subgraphs whose inputs are all constants. - verify – run the exported model under onnxruntime and compare against eager execution of exported_program. - rtol/atol – tolerances used by verify. - external_data – store initializers in a side-car file. None decides from the model size (models at or above the 2 GiB protobuf limit). - external_data_location – side-car file name for external_data. - check_model – run onnx.checker over the finished model. Returns: The onnx.ModelProto when f is None, else None.