I was trying to load weights into the model without the head. Since layers mismatch, I had to use model.load_weights(filename, by_name=True, skip_mismatch=True).
This worked fine for the 's' version of the model, but for the 'm' model I noticed the loss was exploding during training. I then investigated and found that the weights are not loaded if the by_name option is used. I looked into the keys of the h5 files and found that names don't start like:
activation, activation_1, activation_2
but rather like:
activation_191, activation_192, activation_193
I guess during the conversion you first converted the 's' model, then loaded the 'm' model. During this the names probably just kept increasing.
My current workaround is to load the weights without using by_name, then saving them again, and then using them with by_name.
So I suggest that you replace the weights with fixed ones.
Yes, you are right! Just I have to create multi models during conversion. I have converted them all again through colab, and made sure all of their input layer are input_1.
I was trying to load weights into the model without the head. Since layers mismatch, I had to use model.load_weights(filename, by_name=True, skip_mismatch=True). This worked fine for the 's' version of the model, but for the 'm' model I noticed the loss was exploding during training. I then investigated and found that the weights are not loaded if the by_name option is used. I looked into the keys of the h5 files and found that names don't start like:
activation, activation_1, activation_2
but rather like: activation_191, activation_192, activation_193
I guess during the conversion you first converted the 's' model, then loaded the 'm' model. During this the names probably just kept increasing. My current workaround is to load the weights without using by_name, then saving them again, and then using them with by_name. So I suggest that you replace the weights with fixed ones.