I trained the Tensorflow Model, and now I want to export a "function" to use in my python program. Is it possible, and if so, how? Any help would be nice, can't find much in the documentation. (I do not want to keep the session!)
Now I saved the session as you suggested. I download it now as follows:
f = open('batches/batch_9.pkl', 'rb')
input = pickle.load(f)
f.close()
sess = tf.Session()
saver = tf.train.Saver()
saver.restore(sess, 'trained_network.ckpt')
y_pred = []
sess.run(y_pred, feed_dict={x: input})
print(y_pred)
However, when I try to initialize the keeper, I get the error message "No variables to save."
What I want to do is: I am writing a bot for a board game, and the input is the situation on the board, formatted as a tensor. Now I want to return the tensor, which gives me the best position for the game further, i.e. A tensor with 0 everywhere and 1 in one position.