Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad marshal data (unknown type code) #8

Open
GopinathMathiyalagan94 opened this issue Aug 16, 2018 · 4 comments
Open

bad marshal data (unknown type code) #8

GopinathMathiyalagan94 opened this issue Aug 16, 2018 · 4 comments

Comments

@GopinathMathiyalagan94
Copy link

Using TensorFlow backend.
Traceback (most recent call last):
File "rec-feat.py", line 13, in
FRmodel = load_model('face-rec_Google.h5')
File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 243, in load_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 317, in model_from_config
return layer_module.deserialize(config, custom_objects=custom_objects)
File "/usr/local/lib/python2.7/dist-packages/keras/layers/init.py", line 55, in deserialize
printable_module_name='layer')
File "/usr/local/lib/python2.7/dist-packages/keras/utils/generic_utils.py", line 144, in deserialize_keras_object
list(custom_objects.items())))
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 2510, in from_config
process_layer(layer_data)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 2496, in process_layer
custom_objects=custom_objects)
File "/usr/local/lib/python2.7/dist-packages/keras/layers/init.py", line 55, in deserialize
printable_module_name='layer')
File "/usr/local/lib/python2.7/dist-packages/keras/utils/generic_utils.py", line 144, in deserialize_keras_object
list(custom_objects.items())))
File "/usr/local/lib/python2.7/dist-packages/keras/layers/core.py", line 711, in from_config
function = func_load(config['function'], globs=globs)
File "/usr/local/lib/python2.7/dist-packages/keras/utils/generic_utils.py", line 234, in func_load
code = marshal.loads(raw_code)
ValueError: bad marshal data (unknown type code)

while trying to run the rec-feat.py facing this error

@patilameya825
Copy link

Use python3.5. It worked for me.

@NishantSinghChandel
Copy link

I am facing the same issue with python 3.8.

@xugaoxiang
Copy link

xugaoxiang commented Jul 23, 2021

Same error, python3.8 anaconda。

3.7.10 works.

@salimi-erfan
Copy link

Same error, python3.10 :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants