title: Save and load weights in keras
body: <p>Im trying to save and load weights from the model i have trained.</p>
  
  <p>the code im using to save the model is.</p>
  
  <pre><code>TensorBoard(log_dir='/output')
  model.fit_generator(image_a_b_gen(batch_size), steps_per_epoch=1, epochs=1)
  model.save_weights('model.hdf5')
  model.save_weights('myModel.h5')
  </code></pre>
  
  <p>Let me know if this an incorrect way to do it,or if there is a better way to do it.</p>
  
  <p>but when i try to load them,using this,</p>
  
  <pre><code>from keras.models import load_model
  model = load_model('myModel.h5')
  </code></pre>
  
  <p>but i get this error:</p>
  
  <hr>
  
  <pre><code>ValueError                                Traceback (most recent call 
  last)
  &lt;ipython-input-7-27d58dc8bb48&gt; in &lt;module&gt;()
        1 from keras.models import load_model
  ----&gt; 2 model = load_model('myModel.h5')
  
  /home/decentmakeover2/anaconda3/lib/python3.5/site-
  packages/keras/models.py in load_model(filepath, custom_objects, compile)
      235         model_config = f.attrs.get('model_config')
      236         if model_config is None:
  --&gt; 237             raise ValueError('No model found in config file.')
      238         model_config = json.loads(model_config.decode('utf-8'))
      239         model = model_from_config(model_config, 
  custom_objects=custom_objects)
  
  ValueError: No model found in config file.
  </code></pre>
  
  <p>Any suggestions on what i may be doing wrong?
  Thank you in advance.</p>