def METHOD_NAME(self, **kwargs):
    def to_tensor(array):
        """
        numpy array -> tensor
        """
        import torch
        array = torch.tensor(array)
        return array.cuda() if self.cfg.use_gpu else array
    # construct model
    if 'model' in kwargs:
        self.model = kwargs['model']
    else:
        self.model = SpaceModelBase.create(
            kwargs['model_dir'],
            self.cfg,
            reader=self.bpe,
            generator=self.generator)
    import torch
    # multi-gpu
    if self.cfg.Trainer.gpu > 1 and torch.cuda.device_count() > 1:
        self.model = torch.nn.DataParallel(self.model)
    # construct trainer
    self.trainer = IntentTrainer(
        self.model, to_tensor, self.cfg, reader=self.bpe)
    num_batches = len(self.train_label_loader)
    self.trainer.set_optimizers(num_training_steps_per_epoch=num_batches)
    # load model, optimizer and lr_scheduler
    self.trainer.load()