Моя операционная система - Ubuntu.
И у меня появилось это сообщение об ошибке, когда я запускал свою модель keras.
Я нашел некоторые решения, но они не работают.Например, я попробовал упомянутые решения в этом посте: Как исправить Python ValueError: неверные данные маршала?
Using TensorFlow backend.
[INFO] loading network...
Traceback (most recent call last):
File "classify.py", line 43, in <module>
color_model = load_model(color_model_path, custom_objects={"tf": tf})
File "/home/ubuntufashion/.local/lib/python2.7/site-
packages/keras/engine/saving.py", line 260, in load_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "/home/ubuntufashion/.local/lib/python2.7/site-
packages/keras/engine/saving.py", line 334, in model_from_config
return deserialize(config, custom_objects=custom_objects)
File "/home/ubuntufashion/.local/lib/python2.7/site-
packages/keras/layers/__init__.py", line 55, in deserialize
printable_module_name='layer')
File "/home/ubuntufashion/.local/lib/python2.7/site-
packages/keras/utils/generic_utils.py", line 145, in
deserialize_keras_object
list(custom_objects.items())))
File "/home/ubuntufashion/.local/lib/python2.7/site-
packages/keras/engine/network.py", line 1017, in from_config
process_layer(layer_data)
File "/home/ubuntufashion/.local/lib/python2.7/site-
packages/keras/engine/network.py", line 1003, in process_layer
custom_objects=custom_objects)
File "/home/ubuntufashion/.local/lib/python2.7/site-
packages/keras/layers/__init__.py", line 55, in deserialize
printable_module_name='layer')
File "/home/ubuntufashion/.local/lib/python2.7/site-
packages/keras/utils/generic_utils.py", line 145, in
deserialize_keras_object
list(custom_objects.items())))
File "/home/ubuntufashion/.local/lib/python2.7/site-
packages/keras/layers/core.py", line 730, in from_config
function = func_load(config['function'], globs=globs)
File "/home/ubuntufashion/.local/lib/python2.7/site-
packages/keras/utils/generic_utils.py", line 235, in func_load
code = marshal.loads(raw_code)
ValueError: bad marshal data (unknown type code)
Спасибо за чтение этого поста!