-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Converted the image format from jpg to fits and encountered an error where the model could not be loaded.
`KeyError Traceback (most recent call last)
in
14 # Load trained weights
15 print("Loading weights from ", model_path)
---> 16 model.load_weights(model_path, by_name=True)
17
E:\pycharmworkspace\mask_galaxy-master\mrcnn\model.py in load_weights(self, filepath, by_name, exclude)
2131
2132 if by_name:
-> 2133 saving.load_weights_from_hdf5_group_by_name(f, layers)
2134 else:
2135 saving.load_weights_from_hdf5_group(f, layers)
e:\pycharmworkspace\mask_galaxy-master\venv\lib\site-packages\keras\engine\topology.py in load_weights_from_hdf5_group_by_name(f, layers, skip_mismatch)
3217 weight_values,
3218 original_keras_version,
-> 3219 original_backend)
3220 if len(weight_values) != len(symbolic_weights):
3221 if skip_mismatch:
e:\pycharmworkspace\mask_galaxy-master\venv\lib\site-packages\keras\engine\topology.py in preprocess_weights_for_loading(layer, weights, original_keras_version, original_backend)
3043 'ConvLSTM2D']
3044 if layer.class.name in conv_layers:
-> 3045 if _need_convert_kernel(original_backend):
3046 weights[0] = conv_utils.convert_kernel(weights[0])
3047 if layer.class.name == 'ConvLSTM2D':
e:\pycharmworkspace\mask_galaxy-master\venv\lib\site-packages\keras\engine\topology.py in _need_convert_kernel(original_backend)
3096 'theano': False,
3097 'cntk': True}
-> 3098 return uses_correlation[original_backend] != uses_correlation[K.backend()]
3099
3100
KeyError: b'tensorflow'`