Hello,
I am not sure if I completely understood your question because more or less you wrote the solution. I don’t know the size of your gen_imgs. But for the sake of simplicity assume I assume the following:
# Assume a batch dimension of 128, 3 channels and 32 pixel width and height
gen_imgs = torch.randn(128, 3, 32, 32)
# You Y has to match the batch dimension
dataset = data_utils.TensorDataset(gen_imgs, torch.from_numpy(np.array([0]*128)))
dataloader = data_utils.DataLoader(dataset, batch_size=8)

for x, y in dataloader:
    # do something
    pass

Or do you want to know how to write the result of your generator on disk?