mt-upc / iwslt-2021

Systems submitted to IWSLT 2021 by the MT-UPC group.
MIT License
14 stars 4 forks source link

how to freeze other components of the model? #7

Open qinglin666635 opened 2 weeks ago

qinglin666635 commented 2 weeks ago

Hello,

I noticed that the configuration file includes parameter freezing operations:

freeze_layers: encoder.feat_extr, encoder.ffn, decoder.embedding, decoder.self_attn, decoder.ffn

If I want to freeze other components of the model or freeze entire some layer of the encoder or decoder, how can I determine the correct names for these components? I observed that the notation in the configuration file differs from the notation used when printing the model structure.

Thank you for your response.

Best wishes

gegallego commented 1 week ago

Hello,

They are defined here. You'll have to modify these lines to do different freezing operations.

Let me know if that's what you were looking for.

Best regards, Gerard

qinglin666635 commented 1 week ago

Hello,

Yes, I am looking for these definitions. However, if I want to freeze an entire layer of the encoder or decoder, how should I modify it? For example, if the decoder has 12 layers and I want to freeze layers 3 to 9.

Best