Thanks, that actually helped me a lot, in fact I removed the transformations within the DataLoader completely and only return the image.
Another question:
For my training I am using a dataset, that lies on a server. It contains about 10.000 images of size 256x256, so it is quite large. Currently I am loading the dataset as a numpy array:
# Load Datasets
data = load_images_from_folder()
train_data = np.array(data[:-1000])
train_dataset = ImageDataset(train_data, arg)
test_data = np.array(data[-1000:])
test_dataset = ImageDataset(test_data, arg)

# Prepare Dataloader & Instances
train_loader = DataLoader(train_dataset, batch_size=bn, shuffle=True)
test_loader = DataLoader(test_dataset, batch_size=bn)

The function load_images_from_folder just returns a list containing all images. Is that the correct approach?
Edit: I want to add, that I am asking because it takes like 5 minutes until my network starts training.