title: Permanently Inject Constant into Tensorflow Graph for Inference
body: <p>I train a model with a placeholder for <code>is_training</code>:</p>
  
  <pre><code>is_training_ph = tf.placeholder(tf.bool)
  </code></pre>
  
  <p>however once training and validation are done, I would like to permanently inject a constant of <code>false</code> in for this value and then "re-optimize" the graph (ie using <a href="https://github.com/tensorflow/tensorflow/blob/5657d0dee8d87f4594b3e5902ed3e3ca8d6dfc0a/tensorflow/python/tools/optimize_for_inference.py" rel="nofollow noreferrer"><code>optimize_for_inference</code></a>). Is there something along the lines of <a href="https://github.com/tensorflow/tensorflow/blob/5657d0dee8d87f4594b3e5902ed3e3ca8d6dfc0a/tensorflow/python/tools/freeze_graph.py" rel="nofollow noreferrer"><code>freeze_graph</code></a> that will do this?</p>