0
ブラウザでケラスモデルを実行しようとしています。私はthisブログに従っていた。Keras.jsエンコーダがhdf5モデルをエンコードできません
model.hdf5
とmodel.json
という2つのモデルファイルがあります。私はまた、他のデータから重みを分けるために必要な2つのpythonファイルencoder.py
とmodel_pb2.py
をgithub repositoryからダウンロードしました。私が走るとき
python encoder.py ./model.hdf5
私は次のエラーが発生しています。
from ._conv import register_converters as _register_converters
Traceback (most recent call last):
File "encoder.py", line 120, in <module>
encoder.serialize()
File "encoder.py", line 68, in serialize
self.model.model_config = hdf5_file.attrs['model_config']
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "/usr/local/lib/python2.7/dist-packages/h5py/_hl/attrs.py", line 60, in __getitem__
attr = h5a.open(self._id, self._e(name))
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5a.pyx", line 77, in h5py.h5a.open
KeyError: "Can't open attribute (can't locate attribute: 'model_config')"
私はグーグルで解決策を見つけることができませんでした。 なぜこのエラーが発生していますか?前もって感謝します。この問題はgithubのに議論し、解決KerasJs V0.3(download from here)
を使用してこの問題を解決するための