Hi everyone,
I am currently playing around with GANs and build a simple one for CIFAR10.
For further use, e.g. as an evaluation set for a CNN, I wanted to save some generated images, but I couldn’t figure out how I would create a dataset and save them for later loading into a DataLoader. Already gave the answer myself 
For simplicity let’s say I know in advance which class is generated (0-9) and tell my generator to generate 100 airplane images which I want to save.
So im my example the generator would take the random noise and generate the specified amount of images. But at that point I am stuck, I though about something like below, but this didn’t seem to work as I got some size mismatch error. Derp, see below 
gen_imgs = generator(Variable(torch.randn(100, 100, 1, 1)))
gen_data = data_utils.TensorDataset(gen_imgs, torch.from_numpy(np.array([0]*100)))

I would be happy, if someone could fill me in, on how I could realise something like that.
Thanks!