def multi_gpu_test(model, data_loader, tmpdir=None):
    model.eval()
    results = []
    dataset = data_loader.dataset
    (rank, world_size) = get_dist_info()
    if (rank == 0):
        prog_bar = mmcv.ProgressBar(len(dataset))
    for (i, data) in enumerate(data_loader):
        with torch.no_grad():
            result = model(return_loss=False, rescale=True, **data)
        results.append(result)
        if (rank == 0):
            batch_size = data['img'][0].size(0)
            for _ in range((batch_size * world_size)):
                prog_bar.update()
    results = collect_results(results, len(dataset), tmpdir)
    return results
def multi_gpu_test(model, data_loader, tmpdir=None):
    model.eval()
    results = []
    dataset = data_loader.dataset
    (rank, world_size) = get_dist_info()
    if (rank == 0):
        prog_bar = mmcv.ProgressBar(len(dataset))
    for (i, data) in enumerate(data_loader):
        with torch.no_grad():
            result = model(return_loss=False, rescale=True, **data)
        results.append(result)
        if (rank == 0):
            batch_size = data['img'][0].size(0)
            for _ in range((batch_size * world_size)):
                prog_bar.update()
    results = collect_results(results, len(dataset), tmpdir)
    return results