You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 20, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 20, 2026. It is now read-only.
stopping gradient for encoder of Transformer #1053
Hello,
I have a pretrained model. I want to load it to train for another task and don't want to train the encoder of transformer. Do you have any convenient way to do that?
Take a look at the FairseqEncoderDecoderModel base class. It should be straightforward to overload the forward method, load any kind of pretrained encoder, and detach() the encoder's output.
Activity
myleott commentedon Aug 27, 2019
Take a look at the FairseqEncoderDecoderModel base class. It should be straightforward to overload the forward method, load any kind of pretrained encoder, and
detach()the encoder's output.Use 1-based indexing for epochs everywhere (#1053)
Use 1-based indexing for epochs everywhere (facebookresearch#1053)
Use 1-based indexing for epochs everywhere (facebookresearch#1053)