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
Exception:..... ValueError: Layer #13 (named "attn_layer_2" in t...2 weights, but the saved weights have 2 elements.
Call ended by exception
Elapsed time: 00:00:00.044523
Traceback (most recent call last):
File "/root/autodl-tmp/project/HSTN-main/HAIKOU-OD/HSTN_HK_train_test.py", line 107, in <module>
train()
File "/root/miniconda3/lib/python3.8/site-packages/pysnooper/tracer.py", line 310, in simple_wrapper
return function(*args, **kwargs)
File "/root/autodl-tmp/project/HSTN-main/HAIKOU-OD/HSTN_HK_train_test.py", line 87, in train
model = create_model()
File "/root/autodl-tmp/project/HSTN-main/HAIKOU-OD/HSTN_HK_train_test.py", line 77, in create_model
model.load_weights(model_file)
File "/root/miniconda3/lib/python3.8/site-packages/tensorflow/python/keras/engine/training.py", line 2326, in load_weights
hdf5_format.load_weights_from_hdf5_group(f, self.layers)
File "/root/miniconda3/lib/python3.8/site-packages/tensorflow/python/keras/saving/hdf5_format.py", line 705, in load_weights_from_hdf5_group
raise ValueError('Layer #' + str(k) + ' (named "' + layer.name +
ValueError: Layer #13 (named "attn_layer_2" in the current model) was found to correspond to layer dense_10 in the save file. However the new layer attn_layer_2 expects 12 weights, but the saved weights have 2 elements.
Process finished with exit code 1
The text was updated successfully, but these errors were encountered:
使用您的仓库代码,NYC-OD,HAIKOU-OD,均报错如下:
The text was updated successfully, but these errors were encountered: