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!

1 Risposta
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
con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande