I am new to Pytorch and not sure if it is possible to create a DataLoader that can read and repeat the same image over and over. I have an example implementation in Tensorflow:
N = 1000
img = tf.keras.preprocessing.image.load_img(path)
tds = tf.data.Dataset.from_tensor_slices(img).repeat(N)
import torch, torch.utils.data as data
x = torch.randn(3,25,25)
N = 10
ds = data.TensorDataset(x.unsqueeze(0).repeat(N,1,1,1))
for item in ds:
img = item[0]
print(img.shape)