def METHOD_NAME(args):
    assert args.config is not None, \
        'No configuration file specified, please set --config'
    cfg = Config(args.config, opts=args.opts)
    builder = SegBuilder(cfg)
    test_config = merge_test_config(cfg, args)
    utils.show_env_info()
    utils.show_cfg_info(cfg)
    utils.set_device(args.device)
    # TODO refactor
    # Only support for the DeepLabv3+ model
    if args.data_format == 'NHWC':
        if cfg.dic['model']['type'] != 'DeepLabV3P':
            raise ValueError(
                'The "NHWC" data format only support the DeepLabV3P model!')
        cfg.dic['model']['data_format'] = args.data_format
        cfg.dic['model']['backbone']['data_format'] = args.data_format
        loss_len = len(cfg.dic['loss']['types'])
        for i in range(loss_len):
            cfg.dic['loss']['types'][i]['data_format'] = args.data_format
    model = builder.model
    if args.model_path:
        utils.load_entire_model(model, args.model_path)
        logger.info('Loaded trained weights successfully.')
    val_dataset = builder.val_dataset
    evaluate(model, val_dataset, num_workers=args.num_workers, **test_config)