0

I am writing a neural network in tensorflow and I want to be able to export my final trained network and import it in another program to play a game. I have found multiple forum posts like: Tensorflow: How to use a trained model in a application? Tensorflow: how to save/restore a model?

I also saw in the tf documentations they were using estimators to save the model but I am not sure if that is what I'm looking for and how to apply it.

But those talk about exporting the entire session and importing it into the application and using Session.run, but as I understand it that requires an input of the predicted output and will run another training step on my network. I don't want to continue training my network - it's finished - I now want to evaluate a specific state given to me by the game only.

Thanks in advance for any help available.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Oha Noch
  • 374
  • 1
  • 7
  • 22

1 Answers1

0

As I know, there are 2 way of doing it.

  1. checkpoint files(metagraph)
  2. savedmodel

savedmodel is very convenient, but study curve is higher than checkpoint file. you can check this tutorial

and import model is not continue run the training, it is basically restore all the variable you learned.

scott huang
  • 2,478
  • 4
  • 21
  • 36