title: Loading a model from checkpoint fails?
body: <p><a href="https://www.tensorflow.org/beta/tutorials/generative/dcgan" rel="nofollow noreferrer">https://www.tensorflow.org/beta/tutorials/generative/dcgan</a>
  I am following this tutorial for a DCGAN and am trying to restore a model from the checkpoint I saved. But when I try to load the model, it gives me an error:</p>
  
  <pre><code>AssertionError: Nothing except the root object matched a checkpointed value. Typically this means that the checkpoint does not match the Python program. The following objects have no matching checkpointed value: [&lt;tensorflow.python.keras.layers.advanced_activations.LeakyReLU object at 0x7f05b545fc88&gt;, &lt;tf.Variable 'conv2d_transpose_5/kernel:0' shape=(3, 3, 1, 64) dtype=float32, numpy=.......
  </code></pre>
  
  <p>I tried to modify the checkpoint by only keeping the generator part since that is all I need from here. After that, I do</p>
  
  <pre><code>latest = tf.train.latest_checkpoint(checkpoint_dir)
  gen_mod = make_generator_model() #This is already defined in the code
  gen_mod.load_weights(latest)
  sample = gen_mod(noise,training=False)
  </code></pre>
  
  <p>which gives me the error. Is there a way to just load the generator part?
  What I want is to be able to generate images with the generator model from a given checkpoint.</p>