Skip to content

Instantly share code, notes, and snippets.

View BinRoot's full-sized avatar

Nishant Shukla BinRoot

View GitHub Profile

TensorFlow Serving in 10 minutes!

TensorFlow SERVING is Googles' recommended way to deploy TensorFlow models. Without proper computer engineering background, it can be quite intimidating, even for people who feel comfortable with TensorFlow itself. Few things that I've found particularly hard were:

  • Tutorial examples have C++ code (which I don't know)
  • Tutorials have Kubernetes, gRPG, Bezel (some of which I saw for the first time)
  • It needs to be compiled. That process takes forever!

After all, it worked just fine. Here I present an easiest possible way to deploy your models with TensorFlow Serving. You will have your self-built model running inside TF-Serving by the end of this tutorial. It will be scalable, and you will be able to query it via REST.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@BinRoot
BinRoot / imdb.md
Created December 18, 2015 01:08 — forked from titipata/imdb.md

#Dowload IMDB data for LSTM example

Here is a snippet to download python code and imdb.pkl

wget http://deeplearning.net/tutorial/code/imdb.py
wget http://deeplearning.net/tutorial/code/lstm.py
wget http://www.iro.umontreal.ca/~lisa/deep/data/imdb.pkl
@BinRoot
BinRoot / tensorflowTutorialOne.py
Created December 18, 2015 01:06 — forked from b38tn1k/tensorflowTutorialOne.py
Google tensorflow tutorial 1 in a file with comments and stuff
import input_data
import tensorflow as tf
# http://www.tensorflow.org/tutorials/mnist/beginners/index.html
print '\033[93m' + 'Tutorial1 from:\nhttp://www.tensorflow.org/tutorials/mnist/beginners/index.html' + '\033[0m'
print 'MNIST INPUT DATA'
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
'PLACE HOLDERS'
# Make a placeholder / value to input on run
class IntersectionFound(Exception):
def __init__(self, user_id):
self.user_id = user_id
def get_friends(user_id):
"""Returns a set of ids representing the friends of the given user."""
def update_shortest_path(shortest_paths, user_id, to_user_id, via_user_id, distance):
"""Update the shortest path for one user."""
if shortest_paths.has_key(user_id):