def evaluate_nc(
    model,
    multicoil=False,
    three_d=False,
    run_id=None,
    n_epochs=200,
    contrast=None,
    acq_type='radial',
    n_samples=None,
    cuda_visible_devices='0123',
    dcomp=False,
    brain=False,
    **acq_kwargs,
):
    if multicoil:
        if brain:
            val_path = f'{FASTMRI_DATA_DIR}brain_multicoil_val/'
        else:
            val_path = f'{FASTMRI_DATA_DIR}multicoil_val/'
    elif three_d:
        val_path = f'{OASIS_DATA_DIR}/val/'
    else:
        val_path = f'{FASTMRI_DATA_DIR}singlecoil_val/'

    os.environ["CUDA_VISIBLE_DEVICES"] = ','.join(cuda_visible_devices)

    if multicoil:
        dataset = multicoil_dataset
        image_size = IM_SIZE
    elif three_d:
        dataset = three_d_dataset
        image_size = VOLUME_SIZE
    else:
        dataset = singlecoil_dataset
        image_size = IM_SIZE
    if not three_d:
        add_kwargs = {
            'contrast': contrast,
            'rand': False,
            'inner_slices': None,
        }
        if multicoil:
            add_kwargs.update(brain=brain)
    else:
        add_kwargs = {}
    add_kwargs.update(**acq_kwargs)
    val_set = dataset(val_path,
                      image_size,
                      acq_type=acq_type,
                      compute_dcomp=dcomp,
                      scale_factor=1e6 if not three_d else 1e-2,
                      **add_kwargs)
    if n_samples is not None:
        val_set = val_set.take(n_samples)
    else:
        val_set = val_set.take(199)

    example_input = next(iter(val_set))[0]
    inputs = _extract_first_elem_of_batch(example_input)
    model(inputs)
    if run_id is not None:
        model.load_weights(
            f'{CHECKPOINTS_DIR}checkpoints/{run_id}-{n_epochs:02d}.hdf5')
    res_name = f'{run_id}_eval_on_{acq_type}'
    if brain:
        res_name += '_brain'
    if contrast is not None:
        res_name += f'_{contrast}'
    if acq_kwargs:
        af = acq_kwargs['af']
        if af != 4:
            res_name += f'_af{af}'
    if three_d:
        m = Metrics({'PSNR': METRIC_FUNCS['PSNR']}, res_name)
    else:
        m = Metrics(METRIC_FUNCS, res_name)
    for x, y_true in tqdm(val_set.as_numpy_iterator(),
                          total=199 if n_samples is None else n_samples):
        y_pred = model.predict(x, batch_size=1)
        m.push(y_true[..., 0], y_pred[..., 0])
        del x
        del y_true
        del y_pred
    print(METRIC_FUNCS.keys())
    print(list(m.means().values()))
    m.to_csv()
    return METRIC_FUNCS, list(m.means().values())
                Path(CHECKPOINTS_DIR) / model_path.format(n_coils=n_coils))
            model_checkpoint = model_checkpoints.get(n_coils, None)
            model_kwargs.update(n_coils=n_coils)
        else:
            output_shape = (320, 320)
            save_path = str(Path(CHECKPOINTS_DIR) / model_path)
        x = x[0:2]
        y_pred = reconstruct_dip(
            x[1],
            x[0],
            model_checkpoint=model_checkpoint,
            save_model=model_checkpoint is None,
            save_path=save_path,
            multicoil=multicoil,
            n_iter=n_iter if model_checkpoint is None else n_iter // 10,
            output_shape=output_shape,
            **model_kwargs,
        )
        if brain:
            model_checkpoints[n_coils] = save_path
        else:
            model_checkpoint = save_path
        m.push(y_true[..., 0], y_pred[..., 0].numpy())
        del x
        del y_true
        del y_pred
    print(METRIC_FUNCS.keys())
    print(list(m.means().values()))
    m.to_csv()
    return METRIC_FUNCS, list(m.means().values())