How to keep lookup tables initialized for prediction (and not just training)?

Viewed 7588

I create a lookup table from tf.contrib.lookup, using the training data (as input). Then, I pass every input through that lookup table, before passing it through my model.

This works for training, but when it comes to online prediction from this same model, it raises the error:

Table not initialized

I'm using SavedModel to save the model. I run the prediction from this saved model.

How can I initialize this table so that it stays initialized? Or is there a better way to save the model so that the table is always initialized?

2 Answers
Related