Load weights, get loaded weights portion.

I want to load the weights from model A to model B.
Model B last few layers are a bit different, thus the weights for those layers should not be loaded.
I’m using

load_weights(    filepath, by_name=True, skip_mismatch=True)

Is there a way to know the portion of weights that have correctly been loaded ?
I just want to make sure than ~90% of the weights get correctly loaded.

Hi Maxime, welcome to the TensorFlow Forum

I don’t think there’s an automatic way of knowing that but you can try to go layer by layer comparing the dimensions, if they are different they won’t get the weights and you can use that to calculate on your side.