def METHOD_NAME(self, nn_define: dict, optimizer_define: dict = None, loss_fn_define: dict = None):
    model = s.recover_sequential_from_dict(nn_define)
    if self.cuda:
        model = model.cuda()
    if optimizer_define is None:  # default optimizer
        optimizer = optim.SGD(lr=0.01)
    else:
        optimizer: FateTorchOptimizer = s.recover_optimizer_from_dict(optimizer_define)
    opt_inst = optimizer.to_torch_instance(model.parameters())
    if loss_fn_define is None:
        loss_fn = backward_loss
    else:
        loss_fn = s.recover_loss_fn_from_dict(loss_fn_define)
    if self.double_model:
        self.model.type(t.float64)
    return model, opt_inst, loss_fn