DataBlock datasets() infinite loop

I’m currently doing a fastai course and I try to apply it to the Fashion-MNIST dataset. I’ve hit a stumbling block. I have a problem creating Datasets object. Here is my code:

# every image in train_images is a Tensor of size 28x28 (floats between [0, 1])

# every label is a Tensor with single digit

train_dataset = list(zip(train_images, train_labels))

dblock = DataBlock(get_items = get_image_files)

dset = dblock.datasets(train_dataset)

The last line of the code creates an infinite loop for me, yet the dataset is only 60000 images long.

Do you have an idea why dblock.datasets call loops? How can I fix it? I’d greatly appreciate any help.