Я пытаюсь загрузить модель keras, я получаю эту ошибку
Я использую следующие пакеты:
Keras: 2.2.4 Tensorflow: 1.13.x Python 2.7.13 Raspbian GNU / Linux 9.8
Использование бэкэнда TensorFlow.Сейчас загружается модель ...
WARNING:tensorflow:From /home/pi/.local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version. Instructions for updating: Colocations handled automatically by placer. Traceback (most recent call last): File "test.py", line 14, in <module>
model = load_model('mobilenet_v2_3(trained).h5') File "/home/pi/.local/lib/python2.7/site-packages/keras/engine/saving.py", line 419, in load_model
model = _deserialize_model(f, custom_objects, compile) File "/home/pi/.local/lib/python2.7/site-packages/keras/engine/saving.py", line 225, in _deserialize_model
model = model_from_config(model_config, custom_objects=custom_objects) File "/home/pi/.local/lib/python2.7/site-packages/keras/engine/saving.py", line 458, in model_from_config
return deserialize(config, custom_objects=custom_objects) File "/home/pi/.local/lib/python2.7/site-packages/keras/layers/__init__.py", line 55, in deserialize
printable_module_name='layer') File "/home/pi/.local/lib/python2.7/site-packages/keras/utils/generic_utils.py", line 145, in deserialize_keras_object
list(custom_objects.items()))) File "/home/pi/.local/lib/python2.7/site-packages/keras/engine/network.py", line 1022, in from_config
process_layer(layer_data) File "/home/pi/.local/lib/python2.7/site-packages/keras/engine/network.py", line 1008, in process_layer
custom_objects=custom_objects) File "/home/pi/.local/lib/python2.7/site-packages/keras/layers/__init__.py", line 55, in deserialize
printable_module_name='layer') File "/home/pi/.local/lib/python2.7/site-packages/keras/utils/generic_utils.py", line 145, in deserialize_keras_object
list(custom_objects.items()))) File "/home/pi/.local/lib/python2.7/site-packages/keras/layers/core.py", line 735, in from_config
function = func_load(config['function'], globs=globs) File "/home/pi/.local/lib/python2.7/site-packages/keras/utils/generic_utils.py", line 235, in func_load
code = marshal.loads(raw_code)
ValueError: неверные данные маршала (код неизвестного типа)