Ошибка h5py при загрузке весов в Керасе
Я пытаюсь запустить этот скрипт: https://github.com/farizrahman4u/keras-contrib/blob/master/examples/cifar10_wide_resnet.py
Тем не менее, я изменяю эту строку
model = WideResidualNetwork(depth=28, width=8, dropout_rate=0.0, weights=None)
в
model = WideResidualNetwork(depth=28, width=8, dropout_rate=0.0, weights='cifar10')
Теперь я получаю следующую ошибку
> Using TensorFlow backend. Traceback (most recent call last): File
> "wide_resnet.py", line 40, in <module>
> model = WideResidualNetwork(depth=28, width=8, dropout_rate=0.0, weights='cifar10', include_top=False) File
> "/usr/local/lib/python3.5/dist-packages/keras_contrib/applications/wide_resnet.py",
> line 151, in WideResidualNetwork
> model.load_weights(weights_path) File "/usr/local/lib/python3.5/dist-packages/keras/engine/topology.py",
> line 2622, in load_weights
> load_weights_from_hdf5_group(f, self.layers) File "/usr/local/lib/python3.5/dist-packages/keras/engine/topology.py",
> line 3106, in load_weights_from_hdf5_group
> g = f[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
> "/home/derk/.local/lib/python3.5/site-packages/h5py/_hl/group.py",
> line 167, in __getitem__
> oid = h5o.open(self.id, self._e(name), lapl=self._lapl) 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/h5o.pyx", line 190, in h5py.h5o.open KeyError: "Unable to
> open object (object 'flatten_2' doesn't exist)"