title: Error : You are trying to load a weight file containing 1 layers into a model with 14 layers
body: <p>Since due to having not enough of resources like GPU and Ram we are using Google Colab for training the model but still there are some limitations in it for example maximum time limit for Google Colab's GPU is only 12-hours.
  Still we trained the model in those 12- hours but the loss doesn't seem to be changing after 1st epoch, due to which we decide to use Auto-Colorize's code and there trained weight's file <strong>"colorize.hdf5"</strong> that is uploaded on GitHub (code available on github link:    <a href="https://github.com/hvvashistha/Auto-Colorize" rel="nofollow noreferrer">https://github.com/hvvashistha/Auto-Colorize</a>) , but on loading those weights we are getting an error. </p>
  
  <p><strong>"You are trying to load a weight file containing 1 layers into a model with 14 layers</strong>." </p>
  
  <p><a href="https://i.stack.imgur.com/5qdIG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5qdIG.png" alt="enter image description here"></a></p>
  
  <p>We have tried to downgrade Keras version to 2.2.0 , 2.1.6 and 2.1.0 but the error didn't resolved.
  we are using the same model structure that been have provided on GitHub but still its giving that error.</p>
  
  <p><strong>Model :</strong>
  This is the model Architecture  </p>
  
  <pre><code>   #Inputs
  embed_input = Input(shape=(1000,))
  encoder_input = Input(shape=(256, 256, 1,))
  
  #Encoder
  encoder_output = Conv2D(64, (3,3), activation='relu', padding='same', strides=2,
                          bias_initializer=TruncatedNormal(mean=0.0, stddev=0.05))(encoder_input)
  encoder_output = Conv2D(128, (3,3), activation='relu', padding='same',
                          bias_initializer=TruncatedNormal(mean=0.0, stddev=0.05))(encoder_output)
  encoder_output = Conv2D(128, (3,3), activation='relu', padding='same', strides=2,
                          bias_initializer=TruncatedNormal(mean=0.0, stddev=0.05))(encoder_output)
  encoder_output = Conv2D(256, (3,3), activation='relu', padding='same',
                          bias_initializer=TruncatedNormal(mean=0.0, stddev=0.05))(encoder_output)
  encoder_output = Conv2D(256, (3,3), activation='relu', padding='same', strides=2,
                          bias_initializer=TruncatedNormal(mean=0.0, stddev=0.05))(encoder_output)
  encoder_output = Conv2D(512, (3,3), activation='relu', padding='same',
                          bias_initializer=TruncatedNormal(mean=0.0, stddev=0.05))(encoder_output)
  encoder_output = Conv2D(512, (3,3), activation='relu', padding='same',
                          bias_initializer=TruncatedNormal(mean=0.0, stddev=0.05))(encoder_output)
  encoder_output = Conv2D(256, (3,3), activation='relu', padding='same',
                          bias_initializer=TruncatedNormal(mean=0.0, stddev=0.05))(encoder_output)
  
  #Fusion
  fusion_output = RepeatVector(32 * 32)(embed_input)
  fusion_output = Reshape(([32, 32, 1000]))(fusion_output)
  fusion_output = concatenate([encoder_output, fusion_output], axis=3)
  fusion_output = Conv2D(256, (1, 1), activation='relu', padding='same',
                          bias_initializer=TruncatedNormal(mean=0.0, stddev=0.05))(fusion_output)
  
  #Decoder
  decoder_output = Conv2D(128, (3,3), activation='relu', padding='same',
                          bias_initializer=TruncatedNormal(mean=0.0, stddev=0.05))(fusion_output)
  decoder_output = UpSampling2D((2, 2))(decoder_output)
  decoder_output = Conv2D(64, (3,3), activation='relu', padding='same',
                          bias_initializer=TruncatedNormal(mean=0.0, stddev=0.05))(decoder_output)
  decoder_output = UpSampling2D((2, 2))(decoder_output)
  decoder_output = Conv2D(32, (3,3), activation='relu', padding='same',
                          bias_initializer=TruncatedNormal(mean=0.0, stddev=0.05))(decoder_output)
  decoder_output = Conv2D(16, (3,3), activation='relu', padding='same',
                          bias_initializer=TruncatedNormal(mean=0.0, stddev=0.05))(decoder_output)
  decoder_output = Conv2D(2, (3, 3), activation='tanh', padding='same',
                          bias_initializer=TruncatedNormal(mean=0.0, stddev=0.05))(decoder_output)
  decoder_output = UpSampling2D((2, 2))(decoder_output)
  
  model = Model(inputs=[encoder_input, embed_input], outputs=decoder_output)
  model.compile(optimizer=RMSprop(lr=1e-3), loss='mse', metrics=['accuracy'])
  </code></pre>
  
  <p><strong>Test_image Function:</strong></p>
  
  <p>I am loading the weights this way.</p>
  
  <pre><code>    test_images = getImages(testing_files)
      model.load_weights('/content/drive/My Drive/weights/orignalcolorize.hdf5')
  </code></pre>
  
  <p>Am I Loading the weights in a wrong way or is this some other issue.</p>