'How do you save the images generated by a pytorch generative adversarial network?

I have followed this Pytorch tutorial on DCGAN to the letter, I managed to generate images successfully, however I cannot extract the generated images individually, they are only generated in the mosaic.

Is there a way to save the generated images one by one?

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source