title: How to read keras model weights without a model
body: <p>A keras model can be saved in two files. One file is with a model architecture. And the other one is with model weights, weights are saved by the method <code>model.save_weights()</code>.</p>
  
  <p>Then weights can be loaded with <code>model.load_weights(file_path)</code>. It assumes that the model exists.</p>
  
  <p>I need to load only weights without a model. I tried to use <code>pickle.load()</code>.</p>
  
  <pre><code>with open(file_path, 'rb') as fp:
      w = pickle.load(fp)
  </code></pre>
  
  <p>But it gives the error:</p>
  
  <pre><code>_pickle.UnpicklingError: invalid load key, 'H'.
  </code></pre>
  
  <p>I suppose that weights file was saved in the way not compatible.
  Is it possible to load only weights from file created by model.save_weights()?</p>