I am trying to get a prediction with a custom input function using estimator.predict, but this gives me the following:
WARNING:tensorflow:Input graph does not contain a QueueRunner. That means predict yields forever. This is probably a mistake.
This does not give me an error, but predictsimply says that it restores the parameters and does not return the actual forecasts. Here is my code:
test_data = [0.03, 0.91, 0.95, 0.10, 0.56, 0.93]
test_data_in = { k: test_data[index] for index, k in enumerate(FEATURES) }
print(test_data_in)
def predict_input_fn(data_set):
feature_cols = { k: tf.reshape(tf.constant(data_set[k], dtype=tf.float32), [-1]) for k in FEATURES }
return feature_cols
predictions = estimator.predict(input_fn=lambda: predict_input_fn(test_data_in))
print(list(predictions))
I examined this problem , but I could not find a solution related to my problem. Why is TensorFlow showing this warning and how can I get rid of it?
source
share