October 2018
Beginner
362 pages
9h 32m
English
Lastly, we need to build a client to interact with our TensorFlow model. Building a custom client to interact with your model is a bit beyond the scope of this book, so we've provided this in the corresponding GitHub repository:
pip install git+ssh://git@github.com/PacktPublishing/hands-On-Artificial-Intelligence-for-Beginners/tf-client.git
from predict_client.prod_client import ProdClientclient = ProdClient('localhost:9000', 'simple', 1)req_data = [{'in_tensor_name': 'a', 'in_tensor_dtype': 'DT_INT32', 'data': 2}]client.predict(req_data)
What's happening here?
Read now
Unlock full access