title: Error in loading checkpoint from tf.train.init_from_checkpoint with tensorflow Estimator
body: <p>I'm trying to load the resnet weights from a retinanet checkpoint file into retinanet model in tf estimator</p>
  
  <p>I have inspected the checkpoint file and the resnet weights are defined under resnet scope like "resnet50/batch_normalization/beta" and the model code for resnet part of retinanet is also under the same scope name. But when I try to load the checkpoint I get the following error - </p>
  
  <pre><code>    RuntimeError: Graph is finalized and cannot be modified.
  </code></pre>
  
  <pre class="lang-py prettyprint-override"><code>def scaffold_fn(scaffold,sess):
      tf.train.init_from_checkpoint(params['resnet_checkpoint'], {
           'resnet50/': 'resnet50/',
      })
  scaffold=tf.train.Scaffold(init_fn=scaffold_fn)
  </code></pre>
  
  <p>this tf.train.Scaffold object is then passed into the estimator.</p>