December 2018
Intermediate to advanced
764 pages
18h 18m
English
The model that is exported in the previous section can be served via TensorFlow Serving using the following command:
tensorflow_model_server --port=9000 --model_name=mnist --model_base_path=/tmp/mnist_model/
The model_base_path points to the directory of the exported model. The server can now be tested with the client. Note that this is not an HTTP server, and hence, a client as shown here, is needed instead of an HTTP client. Import the required libraries:
from grpc.beta import implementationsimport numpyimport tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_datafrom tensorflow_serving.apis import predict_pb2from tensorflow_serving.apis import prediction_service_pb2
Add the constants for ...
Read now
Unlock full access