tangxianfeng / STDN

Code for our Spatiotemporal Dynamic Network
275 stars 98 forks source link

load models #11

Open dryjins opened 2 years ago

dryjins commented 2 years ago

Hi.

It works saving models but I can't load saved models.

I passed attention for custom objects like following.

model = keras.models.load_model('hdf5s/stdn20220520002211.hdf5', custom_objects={'Attention':attention.Attention})

but got error like this

ValueError: You are trying to load a weight file containing 121 layers into a model with 118 layers.

Did I miss something?

B046090010 commented 1 year ago

Hello,

I have the same problem

Do you have any solution?

Thanks a lot.