I have a saved simple LinearRegressor using saved_exportmodel like so:
feature_spec = create_feature_spec_for_parsing(feature_cols)
input_receiver_fn = build_parsing_serving_input_fn(feature_spec)
dnn.export_savedmodel('my_model/', serving_input_fn=input_receiver_fn)
Now, I want to load it and use it for predictions. I know I can use tensorflow_model_server
but I don't want to use grpc. I've experimented with loading graph into session with tf.saved_model.loader.load
but can't seem to make it work and it feels hacky at best. How do I go about it?
I'm using python 3.6 (one of the reasons why I don't want to use grpc) and tensorflow 1.2.
EDIT: For now I copied proto files and created my own client with Python 3.6, but still, I would like to have a way to restore SavedModel without a need to use tensorflow serving, so I'm leaving this question open.