Skip to content

Problem with Keras Version #56

Description

@Hongfei-Niu

When I directly try to use the h5 model in the project by

python recognize_gesture.py

The error was met:

Traceback (most recent call last):
  File "recognize_gesture.py", line 13, in <module>
    model = load_model('cnn_model_keras2.h5')
  File "D:\Applications\Anaconda\envs\sign_lang2\lib\site-packages\keras\models.py", line 271, in load_model
    model = model_from_config(model_config, custom_objects=custom_objects)
  File "D:\Applications\Anaconda\envs\sign_lang2\lib\site-packages\keras\models.py", line 348, in model_from_config
    return layer_module.deserialize(config, custom_objects=custom_objects)
  File "D:\Applications\Anaconda\envs\sign_lang2\lib\site-packages\keras\layers\__init__.py", line 55, in deserialize
    printable_module_name='layer')
  File "D:\Applications\Anaconda\envs\sign_lang2\lib\site-packages\keras\utils\generic_utils.py", line 144, in deserialize_keras_object
    list(custom_objects.items())))
  File "D:\Applications\Anaconda\envs\sign_lang2\lib\site-packages\keras\models.py", line 1407, in from_config
    if 'class_name' not in config[0] or config[0]['class_name'] == 'Merge':
KeyError: 0

I search it and it may caused by the different version of Keras. Could someone please tell me which version of Keras is suitable for the default model in project?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions