Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy and serve prediction using TensorFlow from API?

From google tutorial we know how to train a model in TensorFlow. But what is the best way to save a trained model, then serve the prediction using a basic minimal python api in production server.

My question is basically for TensorFlow best practices to save the model and serve prediction on live server without compromising speed and memory issue. Since the API server will be running on the background for forever.

A small snippet of python code will be appreciated.

like image 235
rayhan Avatar asked Jan 27 '16 12:01

rayhan


People also ask

Is TensorFlow serving a server?

TensorFlow Serving is a flexible, high-performance serving system for machine learning models, designed for production environments. TensorFlow Serving makes it easy to deploy new algorithms and experiments, while keeping the same server architecture and APIs.


1 Answers

TensorFlow Serving is a high performance, open source serving system for machine learning models, designed for production environments and optimized for TensorFlow. The initial release contains C++ server and Python client examples based on gRPC. The basic architecture is shown in the diagram below.

enter image description here

To get started quickly, check out the tutorial.

like image 51
Jarek Wilkiewicz Avatar answered Sep 23 '22 13:09

Jarek Wilkiewicz