application_vnd.jupyter.stderr_output_27.png text_plain_output_5.png text_plain_output_15.png text_plain_output_9.png text_plain_output_20.png application_vnd.jupyter.stderr_output_26.png text_plain_output_4.png text_plain_output_13.png text_plain_output_14.png text_plain_output_10.png text_plain_output_6.png text_plain_output_24.png text_plain_output_21.png text_plain_output_25.png text_plain_output_18.png text_plain_output_3.png text_plain_output_22.png text_plain_output_7.png text_plain_output_16.png text_plain_output_8.png text_plain_output_23.png text_plain_output_2.png text_plain_output_1.png text_plain_output_19.png image_output_2.png image_output_1.png text_plain_output_17.png text_plain_output_11.png text_plain_output_12.png
from torch.utils.data import DataLoader, Dataset

import pandas as pd

kfold_df = pd.read_csv('../input/braintumor-sampling/brain_tumor_kfold.csv')

train_df = kfold_df[kfold_df.fold != 0]
train_ds = DataRetriever(train_df['BraTS21ID'].values, '../input/rsna-miccai-brain-tumor-radiogenomic-classification/train', 'FLAIR', targets=train_df['MGMT_value'].values)
train_dl = DataLoader(train_ds, batch_size=1, shuffle=True, num_workers=1)
next(iter(train_dl))['X'].shape