First published on MSDN on Aug 16, 2018
We have seen how to operationalize Keras models as web services in R and Python in a previous
. Now we will see how to deploy a TensorFlow image classification model to Microsoft Machine Learning Server.
to know more about Microsoft Machine Learning Server Operationalization. You can configure Machine Learning Server to operationalize analytics on a single machine (
) or multiple
web and compute nodes
that are configured on multiple machines along with other enterprise features.
Create a web service for a TensorFlow image classification model in Python
Before you can use the web service management functions in the azureml-model-management-sdk Python package, you must:
Have access to a Python-enabled instance of Machine Learning Server that was
to host web services.
Authenticate with Machine Learning Server in Python as described in "Connecting to Machine Learning Server."
Have a trained TensorFlow image classification model.
In the following example, we are going to demonstrate how to operationalize a TensorFlow image classification model and generate web service API. We are using the trained
model downloaded from
TensorFlow Models Repo
We first put the trained model on each compute node
The below python script loads the model, builds the graph, and decodes image for classification
The below python script deploys the image classification model as a service and generates service swagger
We can use the swagger json file from previous step to generate clients in many languages. With the generated web service API, developers can easily consume the image classification model in their applications. In another