Importing externally-trained TensorFlow v2 models to SageMaker deployment

0

Can anybody suggest nice, reasonably up-to-date example(s) for importing a previously trained TFv2 model to SageMaker? i.e. tarballing the artifact to S3, and configuring the Model & Endpoint (preferably via SageMaker Python SDK).

Most of the examples I've come across so far are for TFv1. Thanks!

AWS
전문가
Alex_T
질문됨 2년 전255회 조회
1개 답변
0

Hi! Assuming you already have a trained model on an Amazon S3 location in a tar.gz format then you should be able to load that using the TensorFlowModel class and deploy from there (using the SDK) as shown in the documentation here: https://sagemaker.readthedocs.io/en/stable/frameworks/tensorflow/using_tf.html#deploying-directly-from-model-artifacts

In the constructor of TensorFlowModel you may also want to pass the keyword argument "framework_version" (more on this here: https://sagemaker.readthedocs.io/en/stable/frameworks/tensorflow/sagemaker.tensorflow.html)

Currently the supported versions of TFv2 are "2.0.4", "2.1.3", "2.2.2", "2.3.2", "2.4.3", "2.5.1" and "2.6.0".

Let me know if this helped answer your question

AWS
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인