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

BC-LSTM text unimodal checkpoint is broken #38

Open
SeanXiaoyuSun opened this issue Nov 4, 2021 · 0 comments
Open

BC-LSTM text unimodal checkpoint is broken #38

SeanXiaoyuSun opened this issue Nov 4, 2021 · 0 comments

Comments

@SeanXiaoyuSun
Copy link

I could run audio unimodal and bimodal BC-LSTM pretrained model, but got the following error when running text unimodal BC-LSTM.

Model initiated for Sentiment classification
Loading data
Labels used for this classification:  {'neutral': 0, 'positive': 1, 'negative': 2}
Traceback (most recent call last):
  File "baseline.py", line 312, in <module>
    model.test_model()
  File "baseline.py", line 234, in test_model
    model = load_model(self.PATH)
  File "/Users/xiaoyu/.pyenv/versions/3.8.7/lib/python3.8/site-packages/keras/saving/save.py", line 200, in load_model
    return hdf5_format.load_model_from_hdf5(filepath, custom_objects,
  File "/Users/xiaoyu/.pyenv/versions/3.8.7/lib/python3.8/site-packages/keras/saving/hdf5_format.py", line 180, in load_model_from_hdf5
    model = model_config_lib.model_from_config(model_config,
  File "/Users/xiaoyu/.pyenv/versions/3.8.7/lib/python3.8/site-packages/keras/saving/model_config.py", line 52, in model_from_config
    return deserialize(config, custom_objects=custom_objects)
  File "/Users/xiaoyu/.pyenv/versions/3.8.7/lib/python3.8/site-packages/keras/layers/serialization.py", line 208, in deserialize
    return generic_utils.deserialize_keras_object(
  File "/Users/xiaoyu/.pyenv/versions/3.8.7/lib/python3.8/site-packages/keras/utils/generic_utils.py", line 674, in deserialize_keras_object
    deserialized_obj = cls.from_config(
  File "/Users/xiaoyu/.pyenv/versions/3.8.7/lib/python3.8/site-packages/keras/engine/training.py", line 2397, in from_config
    functional.reconstruct_from_config(config, custom_objects))
  File "/Users/xiaoyu/.pyenv/versions/3.8.7/lib/python3.8/site-packages/keras/engine/functional.py", line 1273, in reconstruct_from_config
    process_layer(layer_data)
  File "/Users/xiaoyu/.pyenv/versions/3.8.7/lib/python3.8/site-packages/keras/engine/functional.py", line 1255, in process_layer
    layer = deserialize_layer(layer_data, custom_objects=custom_objects)
  File "/Users/xiaoyu/.pyenv/versions/3.8.7/lib/python3.8/site-packages/keras/layers/serialization.py", line 208, in deserialize
    return generic_utils.deserialize_keras_object(
  File "/Users/xiaoyu/.pyenv/versions/3.8.7/lib/python3.8/site-packages/keras/utils/generic_utils.py", line 674, in deserialize_keras_object
    deserialized_obj = cls.from_config(
  File "/Users/xiaoyu/.pyenv/versions/3.8.7/lib/python3.8/site-packages/keras/layers/core.py", line 1005, in from_config
    function = cls._parse_function_from_config(
  File "/Users/xiaoyu/.pyenv/versions/3.8.7/lib/python3.8/site-packages/keras/layers/core.py", line 1057, in _parse_function_from_config
    function = generic_utils.func_load(
  File "/Users/xiaoyu/.pyenv/versions/3.8.7/lib/python3.8/site-packages/keras/utils/generic_utils.py", line 789, in func_load
    code = marshal.loads(raw_code)
ValueError: bad marshal data (unknown type code)

The command I'm running is:
python baseline.py -classify sentiment -modality text -test.

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