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 get this error when I load the weights of a trained model with VGG19 as the base network. Does anyone have any ideas/suggestions about this? I would appreciate it very much.
Traceback (most recent call last): File "main.py", line 63, in <module> model_rpn, model_classifier = get_models(C, common_path, class_mapping) File "/home/helena/Documents/LAR_Celesc/robocelesc_backend/src/utils/model.py", line 76, in get_models model_classifier.load_weights(os.path.join(common_path, 'vgg19_3classes_test_with_no_param_var_classifier_weights.h5'), by_name=True) File "/home/helena/Documents/LAR_Celesc/robocelesc_backend/env/lib/python3.7/site-packages/keras/engine/saving.py", line 492, in load_wrapper return load_function(*args, **kwargs) File "/home/helena/Documents/LAR_Celesc/robocelesc_backend/env/lib/python3.7/site-packages/keras/engine/network.py", line 1227, in load_weights reshape=reshape) File "/home/helena/Documents/LAR_Celesc/robocelesc_backend/env/lib/python3.7/site-packages/keras/engine/saving.py", line 1309, in load_weights_from_hdf5_group_by_name ' element(s).') ValueError: Layer #40 (named "time_distributed_1") expects 0 weight(s), but the saved weights have 2 element(s).
Hi guys!
I get this error when I load the weights of a trained model with VGG19 as the base network. Does anyone have any ideas/suggestions about this? I would appreciate it very much.
Traceback (most recent call last): File "main.py", line 63, in <module> model_rpn, model_classifier = get_models(C, common_path, class_mapping) File "/home/helena/Documents/LAR_Celesc/robocelesc_backend/src/utils/model.py", line 76, in get_models model_classifier.load_weights(os.path.join(common_path, 'vgg19_3classes_test_with_no_param_var_classifier_weights.h5'), by_name=True) File "/home/helena/Documents/LAR_Celesc/robocelesc_backend/env/lib/python3.7/site-packages/keras/engine/saving.py", line 492, in load_wrapper return load_function(*args, **kwargs) File "/home/helena/Documents/LAR_Celesc/robocelesc_backend/env/lib/python3.7/site-packages/keras/engine/network.py", line 1227, in load_weights reshape=reshape) File "/home/helena/Documents/LAR_Celesc/robocelesc_backend/env/lib/python3.7/site-packages/keras/engine/saving.py", line 1309, in load_weights_from_hdf5_group_by_name ' element(s).') ValueError: Layer #40 (named "time_distributed_1") expects 0 weight(s), but the saved weights have 2 element(s).
The code is:
`input_shape_img = (None, None, 3)
Regards, Helena.
The text was updated successfully, but these errors were encountered: