WeidiXie / VGG-Speaker-Recognition

Utterance-level Aggregation For Speaker Recognition In The Wild
363 stars 97 forks source link

Non-trainable params: 19,136 #54

Closed llearner closed 4 years ago

llearner commented 4 years ago

Hi, Weidi, when I load pretrained model, it occurs "Non-trainable params: 19,136". I try to find layers which trainable=False, but I didn't find it. Can you give me some guidance? And whether it influnce finetune result or not?

WeidiXie commented 4 years ago

that's the last classifier layer, the weights there is not included.

What you can do is, loading the model with strict = False, and the last layer (classifier) will then be randomly initialised.

llearner commented 4 years ago

that's the last classifier layer, the weights there is not included.

What you can do is, loading the model with strict = False, and the last layer (classifier) will then be randomly initialised.

You mean the softmax layer or the layer after softmax layer? The network mode is "train", and load_weights attribute "by_name" is True. For the softmax(prediction) layer, it seems the number of params is 512*5994.

WeidiXie commented 4 years ago

oh, yes, you are right, so, where does this 19,136 come from ? do you know which layer ? This code has been quite a long time.... So I can't remember that well..