8 votes
Accepted

How can the discriminator determine the sample is fake or real?

In a GAN, the discriminator starts untrained, and the generator and discriminator are trained alongside each other. The process relies on neither being too strong for the other at any one stage, so ...
Neil Slater's user avatar
  • 32.1k
6 votes
Accepted

Why are the generator and discriminator designed differently in this example?

In general both the generator and discriminator of GANs would consist of multiple convolutional or linear layers to capture complex patterns in the data. And the specific code you provided seems to ...
cinch's user avatar
  • 2,262
4 votes
Accepted

Implementing a GAN with control over the output class

This is a common use case for GANs, you want the output to be conditioned on some controlled input, as opposed to just random seed data. This Medium article cGAN: Conditional Generative Adversarial ...
Neil Slater's user avatar
  • 32.1k
3 votes
Accepted

Do I understand the technology of AI upscaling of films and cartoons correctly?

The approach you outline in the steps 1 to 4 will work to a degree, and may be used in some very basic video upscaling systems. However, the results may not be satisfcatory. A very typical problem ...
Neil Slater's user avatar
  • 32.1k
3 votes
Accepted

In the conditional GAN (cGAN) architecture, why does the discriminator need conditional variable?

Because otherwise there is no conditioning... consider the case where you condition the generator but not the discriminator: given an image and a label, the generator proposes an image, which will be ...
Alberto's user avatar
  • 1,915
3 votes

Implementing a GAN with control over the output class

I agree with @Neil answer, as I also strongly believe that cGANs are the actual answer of your problem. However, as he suggested, maybe it's worth mentioning that also GANs inversion can be used to do ...
Alberto's user avatar
  • 1,915
3 votes

Can someone explain R1 regularization function in simple terms?

The current accepted answer is completely incorrect. The $R_1$ regularization is dealing with the gradient with respect to the data $x$, not the model parameters. The gradient being orthogonal to the ...
Vityou's user avatar
  • 41
3 votes

Comparison of the two alternative forms for the KL divergence

The KL divergence is just not symmetric, and so changing $q$ for $p$, and vice-versa, gives you a different behavior because the expectation is computed on a different distribution. In the first plot,...
Luca Anzalone's user avatar
2 votes

What are alternatives to Inception Score? Can it be used for non-photographic image types?

Consider that the problem of evaluating (or measuring) the quality of generated images, can be expressed in terms of texture quality and/or perceptual quality. The texture quality measures how close ...
Luca Anzalone's user avatar
2 votes
Accepted

Which face filter algorithms can work on CPU or integrated GPU?

Face filters works by first detecting and localizing the face, then predicting the so called facial landmarks (a set of points that depict the geometry of the face, like its contour, shape of eyes, ...
Luca Anzalone's user avatar
2 votes

Are there some known neural networks that, given an input image, can generate a similar image, with the same topic?

(Good) GANs are highly specific. If you had a specific domain in mind, e.g. just human faces then you could use something like a Bicycle GAN. On top of a Generator (& Discriminator) this includes ...
Ronald's user avatar
  • 21
2 votes

Are popular songs considered outliers to AI

The concept of "music similarity" isn't very clear cut -- I'm not sure that I personally would popular songs outliers. Artists take inspiration from existing music, so musical styles, ...
Alexander Wan's user avatar
2 votes
Accepted

Generator loss not decreasing while training GAN

Without looking too much at the code, as this is not a place to ask debugging questions, I'll give some advice on how to potentially solve your problems. I'll assume your code is operational (its ...
Robin van Hoorn's user avatar
2 votes
Accepted

What are meaning of parameters $\theta$ in this context?

As explained in your reference the yellow generative model is a neural network that takes randomly sampled points from a unit Gaussian distribution as input and generates an approximated distribution $...
cinch's user avatar
  • 2,262
2 votes
Accepted

Why does the latent space in Stable Diffusion have a shape of 64x64x3?

There's not really a restriction on the shape for variational autoencoders. If you really wanted a 1D vector, you could just flatten the matrix and get a vector of size ...
Alexander Wan's user avatar
2 votes
Accepted

The training process of a conditional GAN

I assume you mean how to label the image and class inputs since the discriminator can reasonably output either "real" or "fake" labels for either of those inputs, and you generally ...
Neil Slater's user avatar
  • 32.1k
1 vote
Accepted

Why do you sample twice from the generator during a GAN training step?

By resampling from the generator after each update to the discriminator, you ensure that the generator is adapting to the evolving discriminator and producing diverse and realistic fake samples in ...
cinch's user avatar
  • 2,262
1 vote
Accepted

Do GANs have constant running time?

The question is a bit ill defined... usually when we want some bound on the running time, we have to say with respect to what For example: sorting is O(nlogn) wrt the size of the input Transformer is ...
Alberto's user avatar
  • 1,915
1 vote

Do WGAN gradients require multi-variable calculus?

A function can be optimized, even if it has two inputs! First, note that the problem in question already occurs with traditional GANs as well. It might be easier to understand what is going on if you ...
Robin van Hoorn's user avatar
1 vote

How to deal with sparse 1D data with WGAN-gp

Although there is no definitive answer for what you are asking, I can offer my 2 cents on what I would do in your situation. With sparse data, you first want to check if you can compress your sparse ...
Robin van Hoorn's user avatar
1 vote
Accepted

How the generator loss works in a GAN

What am I missing? The generator's loss is not calculated by comparing its output to a target value, but by processing it through the discriminator. So it is still technically a function of its ...
Neil Slater's user avatar
  • 32.1k
1 vote

Math behind Diffusion models explanation?

That exponential comes from the PDF of the assumed distribution that you might have missed in the blogpost: and plug those PDF in that bayes formula and you will end up with those equations
Alberto's user avatar
  • 1,915
1 vote
Accepted

how the GAN architecture maintain similar images close in the latent space?

The GAN generator is an encoder from a latent space. The latent space is unconstrained by any individual items of training data, it doesn't matter which real images are shown to help train the ...
Neil Slater's user avatar
  • 32.1k
1 vote

Are popular songs considered outliers to AI

I'm not sure what you plan to do, but I think that you are misunderstanding both what an outlier is and how GANs work. An observation being an outlier is a property that's relative to the expected ...
Mario Asis's user avatar
1 vote
Accepted

Why does the critic of WGAN-GP run more steps than the generator?

Balancing the training of the generator and the critic is essential for high-quality GANs. If either the generator or the discriminator overpowers the other, the model will not converge to a ...
Robin van Hoorn's user avatar
1 vote

What is the intuition behind the Label Smoothing in GANs?

From the previous paragraph: "This, however, can cause two problems. First, it may result in over-fitting: if the model learns to assign full probability to the groundtruth label for each ...
postnubilaphoebus's user avatar
1 vote

Why is my GAN more unstable with bigger networks?

Variance What it seems to be taking place here is a form of overfitting. Specifically when using larger layers, the model may become too complex and start to fit the noise in the training data, rather ...
hH1sG0n3's user avatar
  • 211

Only top scored, non community-wiki answers of a minimum length are eligible