mmf
mmf copied to clipboard
Adding custom embedding into model
❓ Questions and Help
I am using m4c model, in mmf, word embedding for ocr tokens are loaded by fasttext model during dataset process. However, I want to use custom embedding for ocr tokens (include corresponding vocab and load pretrained embedding) and add this embedding into model and train the embedding together. How can I achieve this?
Hi @nan1104, thanks for using mmf,
Feel free to subclass our m4c model to achieve the functionality you need. MMF is designed to be customizable and composable. Make sure that you register the subclass of the model, so that in your script to launch training, you can specify the model as subclass name.
Hello, as @nan1104 , I want to add a module (composed by vocab and pretrained embeddings) to the m4c model, as the fastext is implemented.
Sorry for bothering you @ytsheng, but your answer didn't respond to the question. What are the files
that one is suppose to modify to achive this?
Thanks, Emanuele