Inserting custom layer in a pretrained model

Does this help?
It’s not about GPT-2, but maybe you could replicate this for your use case.

1 Like