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
EXPERT
Alex_T
asked 2 years ago248 views
1 Answer
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
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions