Method: projects.locations.models.export
Stay organized with collections
Save and categorize content based on your preferences.
Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A model is considered export-able if and only if it has an export format defined for it in ModelExportOutputConfig
.
Returns an empty response in the response
field when it completes.
HTTP request
POST https://automl.googleapis.com/v1/{name}:export
Path parameters
Parameters |
name |
string
Required. The resource name of the model to export.
Authorization requires the following Google IAM permission on the specified resource name :
|
Request body
The request body contains data with the following structure:
Fields |
outputConfig |
object (ModelExportOutputConfig )
Required. The desired output location and configuration.
|
Response body
If successful, the response body contains an instance of Operation
.
Authorization Scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
ModelExportOutputConfig
Output configuration for ModelExport Action.
JSON representation |
{
"modelFormat": string,
"params": {
string: string,
...
},
"gcsDestination": {
object (GcsDestination )
}
} |
Fields |
modelFormat |
string
The format in which the model must be exported. The available, and default, formats depend on the problem and model type (if given problem and type combination doesn't have a format listed, it means its models are not exportable):
For Image Classification mobile-low-latency-1, mobile-versatile-1, mobile-high-accuracy-1: "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js", "docker".
For Image Classification mobile-core-ml-low-latency-1, mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1: "core_ml" (default).
For Image Object Detection mobile-low-latency-1, mobile-versatile-1, mobile-high-accuracy-1: "tflite", "tf_saved_model", "tf_js". Formats description:
tflite - Used for Android mobile devices.
- edgetpu_tflite - Used for Edge TPU devices.
- tf_saved_model - A tensorflow model in SavedModel format.
- tf_js - A TensorFlow.js model that can be used in the browser and in Node.js using JavaScript.
- docker - Used for Docker containers. Use the params field to customize the container. The container is verified to work correctly on ubuntu 16.04 operating system. See more at [containers
quickstart](https: //cloud.google.com/vision/automl/docs/containers-gcs-quickstart) * core_ml - Used for iOS mobile devices.
|
params |
map (key: string, value: string)
Additional model-type and format specific parameters describing the requirements for the to be exported model files, any string must be up to 25000 characters long.
- For
docker format: cpu_architecture - (string) "x86_64" (default). gpu_architecture - (string) "none" (default), "nvidia".
|
gcsDestination |
object (GcsDestination )
Required. The Google Cloud Storage location where the model is to be written to. This location may only be set for the following model formats: "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml". Under the directory given as the destination a new one with name "model-export--", where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, will be created. Inside the model and any of its supporting files will be written.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2019-12-17 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2019-12-17 UTC."],[[["This API exports a trained model to a specified Google Cloud Storage location, provided the model has a defined export format."],["The HTTP request to export a model is a POST request to `https://automl.googleapis.com/v1/{name}:export`, where `{name}` is the resource name of the model and the user needs `automl.models.export` Google IAM permissions."],["The request body requires an `outputConfig` object that includes the desired output location and configuration for the model, referencing the `ModelExportOutputConfig`."],["The `ModelExportOutputConfig` allows specifying the model format, such as \"tflite,\" \"tf_saved_model,\" or \"core_ml,\" with different formats available based on the model type, along with additional format-specific parameters."],["The response to a successful export request is an instance of `Operation`, and exporting a model also requires the `https://www.googleapis.com/auth/cloud-platform` OAuth scope."]]],[]]