I’m not the best coder, so I apologise in advance for any potential mistakes in understanding the architecture or terminology. I have a built .pt translation model and I need somehow to extract from it embeddings for particular words (from the first layer of the encoder, if I’m not mistaken.) Could you please guide me how I can do that using openmt py source code?
My initial plan was to replace the original encoder’s embeddings of specific words with alternative vectors like an average between two embeddings or x2 etc…And to translate with the model using these changed embeddings and to see the results. Is there a way to do that?