model.initialize(data_config)
with tf.Graph().as_default():
dataset = estimator.make_input_fn(model, mode, 16, features_file, labels_file)()
iterator = tf.compat.v1.data.make_initializable_iterator(dataset)
features = iterator.get_next()
estimator_spec = estimator.make_model_fn(model)(features, None, params, mode, None)
with self.session() as sess:
sess.run(tf.compat.v1.global_variables_initializer())
sess.run(tf.compat.v1.local_variables_initializer())
sess.run(tf.compat.v1.tables_initializer())
sess.run(iterator.initializer)
_ = sess.run(estimator_spec.predictions)
def testSequenceToSequenceServing(self):
// Test that serving features can be forwarded into the model.