title: keras model load error
body: <p>I saved my model post training successfully using </p>
  
  <pre><code>model.save("my_model.h5")
  </code></pre>
  
  <p>Now, when I try to load model using <code>load_model</code>, it gives the following error </p>
  
  <pre><code>model = load_model("my_model.h5") 
  ValueError: You are trying to load a weight file containing 8 layers into a model with 0 layers. 
  </code></pre>
  
  <p>My code : </p>
  
  <pre><code>model = create_model(layer_sizes1, layer_sizes2, input_shape1, input_shape2,learning_rate, reg_par, outdim_size, use_all_singular_values)
  model.summary()
  model = train_model(model, data1, data2, epoch_num, batch_size)
  model.save("my_model.h5")
  </code></pre>
  
  <p>This saves the model, but when I try to <code>load_model</code> it gives above mentioned error . </p>
  
  <p>Model is neural network with three hidden layers. Model definition u can find here : <a href="https://github.com/adakum/DeepCCA" rel="nofollow noreferrer">https://github.com/adakum/DeepCCA</a></p>