Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: CC-BY-SA-4.0
You can use Amazon SageMaker to train and deploy a model using custom TensorFlow code. The Amazon SageMaker Python SDK TensorFlow estimators and models and the Amazon SageMaker open-source TensorFlow containers make writing a TensorFlow script and running it in Amazon SageMaker easier.
For TensorFlow versions 1.11 and later, the Amazon SageMaker Python SDK supports script mode training scripts.
What do you want to do?
I want to train a custom TensorFlow model in Amazon SageMaker.
For a sample Jupyter notebook, see https://github.com/awslabs/amazon-sagemaker-examples/tree/master/sagemaker-python-sdk/tensorflow_distributed_mnist.
For documentation, see Train a Model with TensorFlow.
I have a TensorFlow model that I trained in Amazon SageMaker, and I want to deploy it to a hosted endpoint.
Deploy TensorFlow Serving models.
I have a TensorFlow model that I trained outside of Amazon SageMaker, and I want to deploy it to an Amazon SageMaker endpoint
Deploying directly from model artifacts.
I want to see the API documentation for Amazon SageMaker Python SDK TensorFlow classes.
TensorFlow Estimator
I want to see information about Amazon SageMaker TensorFlow containers.
https://github.com/aws/sagemaker-tensorflow-container.
For general information about writing TensorFlow script mode training scripts and using TensorFlow script mode estimators and models with Amazon SageMaker, see Using TensorFlow with the SageMaker Python SDK.
For information about TensorFlow versions supported by the Amazon SageMaker TensorFlow container, see https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/tensorflow/README.rst.
The Amazon SageMaker Python SDK provides a legacy mode that supports TensorFlow versions 1.11 and earlier. Use legacy mode TensorFlow training scripts to run TensorFlow jobs in Amazon SageMaker if: + You have existing legacy mode scripts that you do not want to convert to script mode. + You want to use a TensorFlow version earlier than 1.11.
For information about writing legacy mode TensorFlow scipts to use with the Amazon SageMaker Python SDK, see https://github.com/aws/sagemaker-python-sdk/tree/v1.12.0/src/sagemaker/tensorflow#tensorflow-sagemaker-estimators-and-models.