MWPToolkit icon indicating copy to clipboard operation
MWPToolkit copied to clipboard

How can I create new models?

Open TalhaAbid opened this issue 2 years ago • 1 comments

I want to combine RoBerta encoder with a gts decoder, using custom dataset, is this possible?have u already implemented it. I need to do this for class research project so any pointers are appreciated, Thank You.

TalhaAbid avatar Nov 26 '21 23:11 TalhaAbid

If you want to combine Roberta encoder with gts decider, my suggestion is writing a new model class under the folder mwptoolkit/model/Seq2Tree, you can reference most code of gts.

Several works has tried to combine pretrained model with gts decoder and we are reproducing their works.

in order to deploy pretrained model in mwptoolkit, we preliminarily implement a dataset class named PretrainDataset, and a dataloader class named PretrainDataloader. So running pretrained model based method, you need to initialize both of them.

And then, the trainer is also need to be initialized,my suggestion is simply inherit GTSTrainer.

In mwptoolkit,some bugs has been found when running custom dataset on gts.It seems like single equation dataset's bug. My suggestion is you can run deployed dataset on the new model.

I hope this will help you!

LYH-YF avatar Dec 03 '21 07:12 LYH-YF