You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I converted the jupyter notebook "Embedding_Space_Visualisation.ipynb" to the python script and I was running using the Python3 environment with Cuda-10.1 installed on my laptop.
I am getting a ValueError: bad marshal data (unknown type code)
Traceback (most recent call last):
File "Embedding_Space_Visualisation.py", line 38, in
siamese = load_model(model_path)
File "/home/user/.local/lib/python3.6/site-packages/keras/engine/saving.py", line 492, in load_wrapper
return load_function(*args, **kwargs)
File "/home/user/.local/lib/python3.6/site-packages/keras/engine/saving.py", line 584, in load_model
model = _deserialize_model(h5dict, custom_objects, compile)
File "/home/user/.local/lib/python3.6/site-packages/keras/engine/saving.py", line 274, in _deserialize_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "/home/user/.local/lib/python3.6/site-packages/keras/engine/saving.py", line 627, in model_from_config
return deserialize(config, custom_objects=custom_objects)
File "/home/user/.local/lib/python3.6/site-packages/keras/layers/init.py", line 168, in deserialize
printable_module_name='layer')
File "/home/user/.local/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 147, in deserialize_keras_object
list(custom_objects.items())))
File "/home/user/.local/lib/python3.6/site-packages/keras/engine/network.py", line 1056, in from_config
process_layer(layer_data)
File "/home/user/.local/lib/python3.6/site-packages/keras/engine/network.py", line 1042, in process_layer
custom_objects=custom_objects)
File "/home/user/.local/lib/python3.6/site-packages/keras/layers/init.py", line 168, in deserialize
printable_module_name='layer')
File "/home/user/.local/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 147, in deserialize_keras_object
list(custom_objects.items())))
File "/home/user/.local/lib/python3.6/site-packages/keras/layers/core.py", line 764, in from_config
function = func_load(config['function'], globs=globs)
File "/home/user/.local/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 237, in func_load
code = marshal.loads(raw_code)
ValueError: bad marshal data (unknown type code)
Can you please help me with the error?
Every help will be appreciated.
Thank you.
The text was updated successfully, but these errors were encountered:
I save the downloaded file to "../models/n_seconds/" and I was able to run that line 38 without a problem. If you haven't tried the above, please try it to see if it works for you.
Further cells down, I am getting an error on the cell with:
Z = [train[i] for i in np.random.randint(0,len(train),size=n_samples)],
train is a class object, so I am still trying to figure out the indexing part.
I converted the jupyter notebook "Embedding_Space_Visualisation.ipynb" to the python script and I was running using the Python3 environment with Cuda-10.1 installed on my laptop.
I am getting a ValueError: bad marshal data (unknown type code)
Traceback (most recent call last):
File "Embedding_Space_Visualisation.py", line 38, in
siamese = load_model(model_path)
File "/home/user/.local/lib/python3.6/site-packages/keras/engine/saving.py", line 492, in load_wrapper
return load_function(*args, **kwargs)
File "/home/user/.local/lib/python3.6/site-packages/keras/engine/saving.py", line 584, in load_model
model = _deserialize_model(h5dict, custom_objects, compile)
File "/home/user/.local/lib/python3.6/site-packages/keras/engine/saving.py", line 274, in _deserialize_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "/home/user/.local/lib/python3.6/site-packages/keras/engine/saving.py", line 627, in model_from_config
return deserialize(config, custom_objects=custom_objects)
File "/home/user/.local/lib/python3.6/site-packages/keras/layers/init.py", line 168, in deserialize
printable_module_name='layer')
File "/home/user/.local/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 147, in deserialize_keras_object
list(custom_objects.items())))
File "/home/user/.local/lib/python3.6/site-packages/keras/engine/network.py", line 1056, in from_config
process_layer(layer_data)
File "/home/user/.local/lib/python3.6/site-packages/keras/engine/network.py", line 1042, in process_layer
custom_objects=custom_objects)
File "/home/user/.local/lib/python3.6/site-packages/keras/layers/init.py", line 168, in deserialize
printable_module_name='layer')
File "/home/user/.local/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 147, in deserialize_keras_object
list(custom_objects.items())))
File "/home/user/.local/lib/python3.6/site-packages/keras/layers/core.py", line 764, in from_config
function = func_load(config['function'], globs=globs)
File "/home/user/.local/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 237, in func_load
code = marshal.loads(raw_code)
ValueError: bad marshal data (unknown type code)
Can you please help me with the error?
Every help will be appreciated.
Thank you.
The text was updated successfully, but these errors were encountered: