title: How to save model in .pb format and then load it for inference in Tensorflow?
body: <p>I am newbie of Tensorflow and trying to run one tutorial code located in <a href="https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/02_Convolutional_Neural_Network.ipynb" rel="nofollow noreferrer">https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/02_Convolutional_Neural_Network.ipynb</a></p>
  
  <p>Based on this code, I would like to try to save the model in .pb format using <code>simple_save</code> and restore it for testing but I have no idea how to modify this piece of code. I have browsed some web pages but still didn't get the idea. Can anyone help me change this piece of code so that I can save the trained model and then load it for inference? Thank you!</p>