tensorflow / lattice

Lattice methods in TensorFlow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use Go binding to serve lattice

cookid opened this issue · comments

I was trying to use TF's Go binding to serve Lattice model. My model loading go code is like:
model, err = tf.LoadSavedModel(localModelDir, []string{"serve"}, nil)
and I got following error:

Op type not registered 'PwlIndexingCalibrator' in binary running on myapp-5b4666d5f6-nmq7x. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) tf.contrib.resampler should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.

I realize there is a solution for tf-serving #19

I'm wondering if there is a similar solution for go binding?

The new version of TF Lattice is based on core TF and does not use custom ops. It should be loadable within Go with tf.LoadSavedModel.