title: Keras.js encoder unable to encode hdf5 model
body: <p>I'm trying to run keras model on browser. I was following <a href="https://intoli.com/blog/keras-weight-transfer/" rel="nofollow noreferrer">this</a> blog.</p>
  <p>I've two model files named <code>model.hdf5</code> and <code>model.json</code>. I have also downloaded the two python files <code>encoder.py</code> and <code>model_pb2.py</code> from <a href="https://raw.githubusercontent.com/transcranial/keras-js/master/python/" rel="nofollow noreferrer">github repository</a> required to separate weights from other data.  When I run</p>
  <pre><code>python encoder.py ./model.hdf5
  </code></pre>
  <p>I am getting the following error.</p>
  <pre><code>from ._conv import register_converters as _register_converters
  Traceback (most recent call last):
    File &quot;encoder.py&quot;, line 120, in &lt;module&gt;
      encoder.serialize()
    File &quot;encoder.py&quot;, line 68, in serialize
      self.model.model_config = hdf5_file.attrs['model_config']
    File &quot;h5py/_objects.pyx&quot;, line 54, in h5py._objects.with_phil.wrapper
    File &quot;h5py/_objects.pyx&quot;, line 55, in h5py._objects.with_phil.wrapper
    File &quot;/usr/local/lib/python2.7/dist-packages/h5py/_hl/attrs.py&quot;, line 60, in __getitem__
      attr = h5a.open(self._id, self._e(name))
    File &quot;h5py/_objects.pyx&quot;, line 54, in h5py._objects.with_phil.wrapper
    File &quot;h5py/_objects.pyx&quot;, line 55, in h5py._objects.with_phil.wrapper
    File &quot;h5py/h5a.pyx&quot;, line 77, in h5py.h5a.open
  KeyError: &quot;Can't open attribute (can't locate attribute: 'model_config')&quot;
  </code></pre>
  <p>I've googled and couldnot find any solutions.
  Why I'm getting this error? thanks in advance.</p>