instead of data_crit = get_crit_data([name_gen, 'images'], bs=bs, size=size)
where name_gen is ‘image_gen’
I thought the point of GAN was to ping pong back and forth between the generator('which outputs to some directory, such as ‘image_gen’ which we manually did), then see how well the critic can tell the difference. Then afterwards, try to train again in such a way that he critic cannot tell the difference. However, if it is just going through the ‘crappy’ directory, which we only made at the beginning of the notebook, how can it know to use the newely generated images?
Does fastai automatically output the generator’s newly generated images to the ‘crappy’ directory?
I had the same question. I’m ridiculously new, but I think it might ignore the ‘crappy’ first part altogether. My guess is that get_crit_data is expecting the two values, and so is Learner (called by create_critic_learner).
But then when you use from_learners, (again this is my guess) the way it combines them has to use newly generated images in order for the gan to work at all. If you think about it, even if you chose name_gen, we only saved the predictions into the name_gen folder once before starting the GAN, so the GAN must be automatically feeding the critic completed images from the generator, presumably saved in ram instead of on disk.
Hopefully, we’ll get an answer from someone more experienced, though.
My understanding is that the learn_gen and learn_crit is the pretrained model we generated, while in the training process of GAN, the input data should be the original ‘crappy’ images, cause that’s the task we need to do (generate a high resolution image from a crappy one). ‘image_gen’ is what we used to pretrain learn_crit which shouldn’t be the input of the final GAN model.
But here, I think whatever data we passed to the learn_crit has no impact to the final input, since GAN will use the data of learn_gen.