export_model(model: PretrainedModel, input_spec=None, path: str | None = None, model_format: str | None = 'paddle') Tuple[List[str], List[str]][源代码]#

Export paddle inference model or onnx model.

  • ([PretrainedModel] (model) -- The model to export.

  • input_spec (paddle.static.InputSpec, optional) -- Describes the input of the saved model’s forward method, which can be described by InputSpec or example Tensor. Default None.

  • path (Optional[str], optional) -- Output dir to save the exported model. Defaults to None.

  • model_format (Optional[str], optional) -- Export model format. There are two options: paddle or onnx, defaults to paddle.