Questions tagged [gan]

GAN refers to Generative Adversarial Networks. Such networks is made of two networks that compete against each other. The first one generates new samples and the second one discriminates between generated samples and true samples.

Filter by
Sorted by
Tagged with
0
votes
1answer
11 views

Get data from intermediate layers in a Pytorch model

I was trying to implement SRGAN in PyTorch and I have to write a Content loss function that required me to fetch activations from intermediate layers for both the Generated Image & Original Image. ...
0
votes
1answer
13 views

How to Connect Convolutional layer to Fully Connected layer in Pytorch while Implementing SRGAN

I was implementing the SRGAN in PyTorch but while implementing the discriminator I was confused about how to add a fully connected layer of 1024 units after the final convolutional layer My input ...
0
votes
1answer
29 views

Improving the pix2pix Architecture for Sketch to Image Translation on a Dataset of Sketches of People to Photos of People

For a university project I need to create a neural network which translates sketches of people into images. In order to implement such a neural network, I decided to implement a pix2pix GAN ...
1
vote
0answers
33 views

pix2pix GAN with Rectangular Image Dataset

I am currently working on a project (for university) which translates sketches of faces to images of this person. For implementing this, I decided to use a pix2pix GAN architecture. However, I have ...
0
votes
0answers
7 views

Regress to the mean problem

I was reading Video-to-Video Synthesis (link) paper, in related works for future video prediction it is mentioned that existing methods fail because of regress-to-the-mean problem. What exactly is the ...
1
vote
1answer
20 views

Using GANs to generate synthetic tabular data to improve supervised learning

One topic I see some people trying is using GANs to generate synthetic tabular data for supervised learning. Also as a way to oversample the minority class in a binary classification. For me creating ...
0
votes
1answer
27 views

How are pictures pre processed before being used as ML data

So I was watching this YouTube video So basically the professor used ML to generate random faces in order to create data for a Kaggle challenge. When I looked into the data file, I was expecting to ...
1
vote
2answers
44 views

When to use GAN over conventional sampling methods?

Let's say I have a dataset from a diabetes hospital which has 30000 Type 2 diabetes and 300 Type 1 diabetes patients. So this dataset has millions and millions of other data points like lab ...
-1
votes
1answer
21 views

How much GPUs are needed for Image ehancement? [closed]

I'm looking for a GPU to train my model. Most of the papers that I have followed used 2 or more gtx 1050ti card or higher. (MIRNet, EnlightenGAN) I need to that how much GPU power will it take to ...
0
votes
1answer
25 views

Image regression problem

I've tried a number of experiments with machine learning. From trying to use GANs to upscale images to playing with auto-encoders. There is one problem that haunts me and always ends up ruining my ...
0
votes
0answers
16 views

Understanding image size changes in DCGAN

I have been studying and trying to implement Generative Adversarial Networks using PyTorch. More precisely I tried to replicate the DCGAN PyTorch Tutorial tutorial using some custom dataset. My code ...
1
vote
0answers
10 views

Why a GAN trained on same data and same parameters may produce different results?

I am trying to train a Generative Adversarial Network and ran the training a few times with same dataset and same parameters but it seems tp produce different results. Why this may happen?
1
vote
0answers
53 views

Is it possible to use Inception Model in GANs (DCGAN) using PyTorch(or any other library)?

MAIN ISSUE: Is it possible to use Inception Model (e.g. v3) for DCGAN using PyTorch(any other library)? I've tried to find info how it could be implemented but nothing has been found. It was explained ...
1
vote
1answer
170 views

Should Discriminator Loss increase or decrease?

This question is purely based on the theoretical aspect of GANs. So, when training a GAN how should the discriminator loss look like? Should the loss of discriminator increase (as the generator is ...
0
votes
1answer
581 views

Tensorflow gradient returns nan or Inf [closed]

I am trying to implement a WGAN-GP model using tensorflow and keras (for credit card fraud data from kaggle). I mostly followed the sample code that is provided in keras website and several other ...
3
votes
2answers
96 views

How is the Gaussian noise given to this BLSTM based GAN?

In a conditional GAN, we give a random noise along with a label to the generator as input. In this paper, I don't understand why in one section of the paper, they say they are giving the random noise ...
0
votes
1answer
31 views

what is meant by minimizing and maximizing in GANs?

It is a subtle change that involves the generator maximizing the log of the discriminator probabilities for generated images instead of minimizing the log of the inverted discriminator probabilities ...
0
votes
1answer
14 views

Generate series of values using Keras GAN architecture

I'm trying to generate something like that: Which is a random sample from my real data function (that i'm trying to mimic). ...
0
votes
0answers
11 views

For calculating gradient penalty, why we need to consider data point that lies on the straight lines between actual and generator data pairs?

I am trying to understand the gradient penalty which was introduced in the following famous paper: Improved Training of Wasserstein GANs Introduced in section 4, equation 3 For calculating gradient ...
3
votes
0answers
54 views

Help interpreting GAN output, and how to fix it?

After a few tries, I had trained a GAN to produce semi-sensible output. In this model, it almost instantly found a solution and got stuck there. The loss for both the discriminator and generator were ...
1
vote
0answers
11 views

Checkerboard artefacts vs distinct objects in GANs

I found a very good solution for getting rid of checkerboard artefacts in GANs: https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix/issues/190 Instead of using Transposed Convolution, use bilinear ...
1
vote
0answers
30 views

Fine tuning Conditional GANs for low data scenarios

I was wondering what the process was for fine tuning a conditional GAN. For example, say I wanted to generate pictures of an object X given a certain condition such as a sentence describing it, which ...
3
votes
1answer
27 views

Generative Adversarial Text to Image Synthesis

Can anyone explain the meaning of this line: "Deep networks have been shown to learn representations in which interpolations between embedding pairs tend to be near the data manifold". ...
0
votes
0answers
58 views

Training Flags on Keras Layers

I'm pretty new the Tensorflow and Keras and I've started to build a simple GAN to analyze and then synthesize some time-series data. I would like to ask for some feedback to confirm my suspicions ...
0
votes
0answers
41 views

Best way to add border to rectangular images to train on StyleGAN2

TLDR: What is a best way to add borders to rectangular images with widely variable aspect ratios (from 0.5 to 2.0) to later use them as training data in StyleGAN2 with data resolution of 1024x1024 and ...
1
vote
2answers
51 views

Using a part of a trained model in a custom loss function -Tensorflow

I want to write a custom loss function that uses the intermediate result of a trained discriminator. the loss function compares images. the loss function is for recovering the latent vector of an ...
1
vote
2answers
17 views

How discriminator loss generated?

The images generated by generator has no labels, then how do Discriminator loss is generated on the basis of classification of generator generated images.
0
votes
0answers
10 views

How would one modify CycleGAN in order to map a distribution to itself?

CycleGAN can map between two different distributions $X$ and $Y$ with cycle consistency. This is done with generator functions $F: X \mapsto Y$ and $G: Y \mapsto X$, such that $||G(F(x)) - x||_1 \...
0
votes
1answer
45 views

Is my loss function right? WGAN

I am new to GANs, but I was able to train a DCGAN decently. I decided to try a WGAN (not the improved one). I seem to get outputs, but my loss doesn't seem to converge for the generator. I am using ...
2
votes
2answers
28 views

Recommendations for learning DCGANs?

I mean stuff that doesn't use Python, Keras or TensorFlow. I have been looking for an in-depth explanation on how to implement a DCGAN from the ground up so I can have a complete understanding of the ...
0
votes
0answers
11 views

Using DCGAN on a (very small) dataset of art

I am developing a DCGAN using the this tutorial in PyCharm. As my usage of this tutorial suggests, I am quite new to DCGANs as I've previously only had a few experiences with machine learning ...
0
votes
0answers
26 views

BatchNormalization for GANs

I am currently implementing a GAN and I tried to find some "best practices" in several tutorials. One of the suggestions was to use BatchNormalization. I am familiar with the concept and know how it ...
1
vote
0answers
36 views

CycleGAN vs. AutoEncoder for transforming sketches into images

I'm playing around with the use of deep learning on images and done quite works : colorizing black and white images for example, or maybe fixing old damaged photos. Today I want to tackle a new ...
0
votes
0answers
45 views

What is the purpose of the minus sign in Adversarial Autoencoder

Iam currently implementing an Adversarial Autoencoder. Based on the architecture shown in the original paper I interpret that the input of the Discriminator is either the random sample from the true ...
2
votes
1answer
39 views

GAN Loss Function Notation Clarification

In the Generative Adversarial Network loss function, what do these mean?: $E_{x~p_{data}(x)}$ and $E_{z~p_{z}(z)}$ and how are they used in this context?
1
vote
0answers
81 views

Why -logD trick in GANs training work?

When training the generator, we want to minimize log(1 - D(G(z))) (this has a form of log (1-x)). Using graph calculator we plot and see that the slope of this function is very small at first, thus ...
5
votes
1answer
184 views

How can my Pytorch based GAN output pure B&W with no grayscale?

My goal is to create simple geometric line drawings in pure black and white. I do not need gray tones. Something like this (example of training image): But using that GAN it produces gray tone images....
0
votes
0answers
38 views

Database augmentation using Sobel filter (aka gradient)

I'm working in PyTorch and to improve a ProGAN training I'm augmenting a database by calculating, for each image, the horizontal and vertical gradient via the Sobel operator. Do you have any reading ...
0
votes
0answers
30 views

LOGICS: GAN with image as input instead of a noise vector

i am having an idea for a single-class classifier. I don't know if this is a logical "short circuit", though. The idea is the following: Instead of a noise vector, i use a "noise-image" as input for ...
9
votes
1answer
370 views

Train a GAN on “before and after” images of dental surgeries [closed]

I want a GAN to train on "before and after" images of dental surgeries; so that it can generate "after" pictures for fresh patients. Input images are like these: https://img.webmd.com/dtmcms/live/...
1
vote
0answers
34 views

Is the hyperbolic tangent function a solution to the weight clipping problem of WGAN?

Instead of clipping to the range $[-c,c]$ in WGAN (Wasserstein generative adversarial network), why not smoothly map into the range $[-c,c]$ by using $c\times \mathrm{tanh}(w)$? This would guarantee ...
1
vote
0answers
31 views

How can I know my GAN does converge?

I am training my GAN, and by looking at the loss curves of the generator and discriminator, I think I am going on the right way because from this blog, my curves look reasonable: A stable GAN will ...
0
votes
0answers
10 views

Picking a model to go ahead with for a WGAN

I have been trying to train a model using WGAN loss functions, working different learning rates to choose my hyper parameters based on advice. I was told to try looking into keeping everything simple ...
1
vote
0answers
36 views

GAN training the average of my train data

I have been training a GAN with 1D convolutional layers on sinus functions. However if I start varying my sinus (random amplitude for example), the model generates only the average of the random range....
2
votes
1answer
1k views

Inception Score (IS) and Fréchet Inception Distance (FID), which one is better for GAN evaluation?

IS uses two criteria in measuring the performance of GAN: The quality of the generated images, and their diversity based on the entropy of the distribution of synthetic data. On the other hand, FID ...
0
votes
1answer
169 views

Generator losses in WGAN and potential convergence failure

I have been training a WGAN for a while now, with my generator training once in every five epochs. I have tried several model architectures(no of filters) and also tried varying the relationship with ...
-3
votes
1answer
37 views

Solve an equation using machine learning [closed]

Imagine we have the following equation: y=xz. We have y but not other ones. Note that y is like a matrix and we could as many sample we want. It is the values obtained from sensors. This means it ...
1
vote
0answers
176 views

GAN loss suddenly explodes and model breaks

Almost every time I've tried to train a DCGAN using keras I find that the loss suddenly skyrockets and the model completely stops improving. I find this happens regardless of what combination of loss ...
0
votes
1answer
67 views

What would be a good loss function to penalize big differences and reward small ones, but not in a linear way?

I have an image with the differences between 2 other images. Concentrations of black pixels mean similar regions between the images, whereas, white values highlight differences. Thus I want a ...