title: Modify pretrained model in tensorflow
body: <p>I want to know how to make changes to a graph loaded from tensorflow's meta and checkpoint files like:</p>
  
  <p><code>saver = tf.train.import_meta_graph('***.meta')
   saver.restore(sess,tf.train.latest_checkpoint('./'))</code></p>
  
  <p>For example, there are <strong>old_layer1 -> old_layer2</strong> in existing graph with pretrained weights. I want to insert one then it becomes <strong>old_layer1 -> new_layer -> old_layer2</strong>, and <strong>new_layer</strong> are randomly initialized since there are no pretrained parameter for it. Answer <a href="https://stackoverflow.com/questions/34235225/is-it-possible-to-modify-an-existing-tensorflow-computation-graph">here</a> said its impossible, since tf's graph only allow append, is this true?</p>
  
  <p>So I wonder if this can be worked around by loading the pretrained layers as individual variables, and assigning pre-trained weights as initial values and connect them by myself, so that I can add new layers between old ones. But I don't know how to do this in code. </p>