generative-adversarial-network

How can I tell what filter size to use for a certain size image?

How can I tell what filter size to use for a certain size image? Question: I was developing a GAN to generate 48×48 images of faces. However, the generator makes strange images no matter how much training is done, and no matter how much the discriminator thinks it’s fake. This leads me to believe that …

Total answers: 4

Forcing PyTorch Neural Net to output a specific datatype

Forcing PyTorch Neural Net to output a specific datatype Question: I am learning how to create a GAN with PyTorch 1.12 and I need the instance returned by my generator to fall into a specific feature space. The model in my generator class looks like this: self.model = nn.Sequential( nn.Linear(2, 16), nn.ReLU(), nn.Linear(16, 32), nn.ReLU(), …

Total answers: 1

RuntimeError: Calculated padded input size per channel: (1 x 1). Kernel size: (4 x 4). Kernel size can't be greater than actual input size

RuntimeError: Calculated padded input size per channel: (1 x 1). Kernel size: (4 x 4). Kernel size can't be greater than actual input size Question: I am trying to train GAN to transfer style. I am getting error when passing images through discriminator for epoch in range(epochs): #code for stats for real_images in tqdm(t_dl): optimizer["discriminator"].zero_grad() …

Total answers: 1

how to save all the generated image in a folder in pytorch

how to save all the generated image in a folder in pytorch Question: I am trying to use data augmentation with pytorch. I want to save all the generated images in a folder (target_dir) with different numbering based on the batch index. Here is my code. I am using epoch=100 and batch_size=128. import os for …

Total answers: 1

How to save and resume training a GAN with multiple model parts with Tensorflow 2/ Keras

How to save and resume training a GAN with multiple model parts with Tensorflow 2/ Keras Question: I am currently trying to add a feature to interrupt and resume training on a GAN created form this example code: https://machinelearningmastery.com/how-to-develop-an-auxiliary-classifier-gan-ac-gan-from-scratch-with-keras/ I managed to get it working in a way where I save the weights of the …

Total answers: 2

DCGAN debugging. Getting just garbage

DCGAN debugging. Getting just garbage Question: Introduction: I am trying to get a CDCGAN (Conditional Deep Convolutional Generative Adversarial Network) to work on the MNIST dataset which should be fairly easy considering that the library (PyTorch) I am using has a tutorial on its website. But I can’t seem to get It working it just …

Total answers: 1