

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Amazon SageMaker AI で TensorFlow を使用するためのリソース
<a name="tf"></a>

Amazon SageMaker AI を使うと、カスタム TensorFlow コードを使ってモデルをトレーニングしてデプロイできます。SageMaker AI Python SDK TensorFlow 推定ツールとモデル、SageMaker AI オープンソース TensorFlow コンテナが役立ちます。次のリソースのリストを使用して、使用している TensorFlow のバージョンと実行したい内容に基づいて、詳細情報を見つけます。

## TensorFlow バージョン 1.11 以降を使用する
<a name="tf-script-mode"></a>

TensorFlow バージョン 1.11 以降に対して、[Amazon SageMaker Python SDK](https://sagemaker.readthedocs.io/en/stable) は、スクリプトモードのトレーニングスクリプトをサポートしています。

### 何をしたいですか?
<a name="tf-intent"></a>

SageMaker AI で、カスタム TensorFlow モデルをトレーニングしたい。  
サンプル Jupyter ノートブックについては、「[TensorFlow スクリプトモードのトレーニングとサービング](https://sagemaker-examples.readthedocs.io/en/latest/sagemaker-python-sdk/tensorflow_script_mode_training_and_serving/tensorflow_script_mode_training_and_serving.html)」を参照してください。  
ドキュメントについては、「[TensorFlow によるモデルのトレーニング](https://sagemaker.readthedocs.io/en/stable/using_tf.html#train-a-model-with-tensorflow)」を参照してください。

SageMaker AI でトレーニングした TensorFlow モデルがあり、それをホスト済みのエンドポイントにデプロイしたい。  
詳細については、「[TensorFlow Serving モデルをデプロイする](https://sagemaker.readthedocs.io/en/stable/using_tf.html#deploy-tensorflow-serving-models)」を参照してください。

SageMaker AI の外部でトレーニングした TensorFlow モデルがあり、それを SageMaker AI エンドポイントにデプロイしたい。  
詳細については、「[モデルアーティファクトから直接デプロイする](https://sagemaker.readthedocs.io/en/stable/using_tf.html#deploying-directly-from-model-artifacts)」を参照してください。

[Amazon SageMaker Python SDK](https://sagemaker.readthedocs.io/en/stable) の TensorFlow クラスの API ドキュメントを見たい。  
詳細については、「[TensorFlow 推定器](https://sagemaker.readthedocs.io/en/stable/sagemaker.tensorflow.html)」を参照してください。

SageMaker AI TensorFlow コンテナリポジトリを見つけたい。  
詳細については、[SageMaker TensorFlow コンテナの GitHub リポジトリ](https://github.com/aws/sagemaker-tensorflow-container)を参照してください。

 AWS Deep Learning Containers がサポートしている TensorFlow バージョンに関する情報を見つけたい。  
詳細については、「[使用可能な Deep Learning Containers イメージ](https://github.com/aws/deep-learning-containers/blob/master/available_images.md)」を参照してください。

 SageMaker AI での TensorFlow スクリプトモードのトレーニングスクリプトの記述や、TensorFlow スクリプトモードの推定ツールとモデルの使用に関する一般情報については、「[SageMaker Python SDK で TensorFlow を使う](https://sagemaker.readthedocs.io/en/stable/using_tf.html)」を参照してください。

## バージョン 1.11 以前の TensorFlow レガシーモードを使用する
<a name="tf-legacy-mode"></a>

[Amazon SageMaker Python SDK](https://sagemaker.readthedocs.io/en/stable) には、TensorFlow バージョン 1.11 以前をサポートするレガシーモードがあります。次の場合、レガシーモードの TensorFlow トレーニングスクリプトを使って、SageMaker AI で TensorFlow ジョブを実行します。
+ スクリプトモードに変換することを望まない既存のモードスクリプトがあります。
+ 1.11 以前の TensorFlow バージョンを使用します。

SageMaker AI Python SDK で使用するレガシーモードの TensorFlow スクリプトの作成方法については、「[TensorFlow SageMaker の推定ツールとモデル](https://github.com/aws/sagemaker-python-sdk/tree/v1.12.0/src/sagemaker/tensorflow#tensorflow-sagemaker-estimators-and-models)」を参照してください。