def METHOD_NAME(task_path, dataset_path, params):
    import paddlex as pdx
    pdx.log_level = 3
    train_transforms, eval_transforms = build_transforms(params)
    train_dataset, eval_dataset = build_datasets(
        dataset_path=dataset_path,
        train_transforms=train_transforms,
        eval_transforms=eval_transforms)
    step_each_epoch = train_dataset.num_samples // params.batch_size
    save_interval_epochs = params.save_interval_epochs
    save_dir = osp.join(task_path, 'output')
    pretrain_weights = params.pretrain_weights
    if pretrain_weights is not None and osp.exists(pretrain_weights):
        pretrain_weights = osp.join(pretrain_weights, 'model.pdparams')
    classifier = getattr(pdx.cls, params.model)
    sensitivities_path = params.sensitivities_path
    pruned_flops = params.pruned_flops
    model = classifier(num_classes=len(train_dataset.labels))
    if sensitivities_path is not None:
        # load weights
        model.net_initialize(pretrain_weights=pretrain_weights)
        pretrain_weights = None
        # prune
        inputs = [1, 3] + list(eval_dataset[0]['image'].shape[:2])
        model.pruner = L1NormFilterPruner(
            model.net, inputs=inputs, sen_file=sensitivities_path)
        model.prune(pruned_flops=pruned_flops)
    optimizer = build_optimizer(model.net.parameters(), step_each_epoch,
                                params)
    model.METHOD_NAME(
        num_epochs=params.num_epochs,
        train_dataset=train_dataset,
        train_batch_size=params.batch_size,
        eval_dataset=eval_dataset,
        save_interval_epochs=save_interval_epochs,
        log_interval_steps=2,
        save_dir=save_dir,
        pretrain_weights=pretrain_weights,
        optimizer=optimizer,
        use_vdl=True,
        resume_checkpoint=params.resume_checkpoint)