rxn.onmt_utils.train_command.OnmtTrainCommand
- class rxn.onmt_utils.train_command.OnmtTrainCommand(command_type, no_gpu, data_weights, **kwargs)[source]
Bases:
objectClass to build the onmt_command for training models, continuing the training, or finetuning.
- Parameters
command_type (
RxnCommand) –no_gpu (
bool) –data_weights (
Tuple[int,...]) –kwargs (
Any) –
- __init__(command_type, no_gpu, data_weights, **kwargs)[source]
- Parameters
command_type (
RxnCommand) –no_gpu (
bool) –data_weights (
Tuple[int,...]) –kwargs (
Any) –
Methods
__init__(command_type, no_gpu, data_weights, ...)- param command_type
cmd()Return the "raw" command for executing onmt_train.
continue_training(batch_size, data, dropout, ...)- param batch_size
execute_from_config_cmd(config_file)Return the command for executing onmt_train with values read from the config.
finetune(batch_size, data, dropout, ...[, ...])- param batch_size
save_to_config_cmd(config_file)Return the command for saving the config to a file.
train(batch_size, data, dropout, heads, ...)- param batch_size