Quantcast
Channel: Saving GAN generated images
Viewing all articles
Browse latest Browse all 6

Saving GAN generated images

$
0
0

Depending on what you want to save, if you want to save every image individually then yes, you can make a loop and save every one of them.

Or you can use the following code to save a grid of all of the images generated.

import torch
from torchvision.utils import save_image

t = torch.rand((64, 3, 50, 50))
save_image(t, "img_grid.png", nrow=8)

In the link provided in the previous post is the documentation for save_image and it says you can use other **kwargs specified in the make_grid function.

Hope this helps :slight_smile:

Read full topic


Viewing all articles
Browse latest Browse all 6

Trending Articles