mwptoolkit.data.dataloader.dataloader_ept¶
- class mwptoolkit.data.dataloader.dataloader_ept.DataLoaderEPT(config: Config, dataset: DatasetEPT)[source]¶
Bases:
TemplateDataLoader
dataloader class for deep-learning model EPT
- Parameters
config –
dataset –
expected that config includes these parameters below:
dataset (str): dataset name.
pretrained_model_path (str): road path of pretrained model.
decoder (str): decoder module name.
model (str): model name.
equation_fix (str): [infix | postfix | prefix], convert equation to specified format.
train_batch_size (int): the training batch size.
test_batch_size (int): the testing batch size.
symbol_for_tree (bool): build output symbols for tree or not.
share_vocab (bool): encoder and decoder of the model share the same vocabulary, often seen in Seq2Seq models.
max_len (int|None): max input length.
add_sos (bool): add sos token at the head of input sequence.
add_eos (bool): add eos token at the tail of input sequence.