generative adversarial networks - github pagesgenerative adversarial networks. abstracting a bit the...
TRANSCRIPT
![Page 1: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/1.jpg)
Generative Adversarial NetworksPrem Seetharaman, CS349
1
![Page 2: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/2.jpg)
Generative models
Generative models are unsupervised. Their only task is to generate samples that look like real samples.
Real samples of faces ->
![Page 3: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/3.jpg)
Generative models
Generative models are unsupervised. Their only task is to generate samples that look like real samples.
Real samples of faces -> Generated faces!
![Page 4: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/4.jpg)
Generative models
With generative models, we can leverage unlabeled training data.
![Page 5: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/5.jpg)
Generative models
Some tasks have many solutions.
Example: generating speech for the same text in different styles.
![Page 6: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/6.jpg)
Generative models
Example: Multiple translations for a given text.
![Page 7: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/7.jpg)
Generative models
Central question: how do we model our training data?
![Page 8: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/8.jpg)
Generative models
In these faces for example, there are several “latent” factors at play. What are they?
![Page 9: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/9.jpg)
Distributions
Recall that training example - an image, an audio clip, etc. - can be thought of as a point in space.
![Page 10: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/10.jpg)
Distributions
Recall that training example - an image, an audio clip, etc. - can be thought of as a point in space.
![Page 11: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/11.jpg)
Distributions
Let’s put all of our training data into this space.
![Page 12: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/12.jpg)
Matching distributions
Then, generating data means to sample from this space such that the sampled points are near real points.
Red: sampled points Blue: real points
![Page 13: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/13.jpg)
Matching distributions
Recall that one way we did that was by fitting a GMM to the space and sampling from it.
GMM w/ 1 component
![Page 14: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/14.jpg)
Matching distributions
As the number of components gets higher, the sampled points start to overlap with the real points.
GMM w/ 3 components
![Page 15: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/15.jpg)
15
GMM with 1 component
![Page 16: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/16.jpg)
16
GMM with 10 components
![Page 17: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/17.jpg)
17
GMM with 50 components
![Page 18: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/18.jpg)
Lots of ways to make this happen
Many other methods for generative modeling: 1. Variational autoencoders 2. Autoregressive models 3. Generative adversarial
networks
![Page 19: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/19.jpg)
Abstracting a bitThe goal is to be able to construct points similar to the real points.
Generator
![Page 20: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/20.jpg)
Abstracting a bit
This is a good generator.
Generator
![Page 21: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/21.jpg)
Abstracting a bit
This is a bad generator.
Generator
![Page 22: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/22.jpg)
Abstracting a bitGenerators can produce multiple points that should hopefully be diverse.
Generator
![Page 23: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/23.jpg)
Abstracting a bitA generator that can only produce one “type” of real sample is bad. Called mode collapse.
Generator
![Page 24: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/24.jpg)
Abstracting a bitA generator that covers all of your training data is good! It produces diverse samples.
Generator
![Page 25: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/25.jpg)
A loss function for generators?So we have some definition for what makes a generator “good” or “bad”. How do we turn this into a loss function?
Generator
![Page 26: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/26.jpg)
Enter the discriminatorThe discriminator tries to tell a generated sample apart from a real sample.
Discriminator
![Page 27: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/27.jpg)
Enter the discriminatorThe discriminator tries to tell whether a sample is real or fake.
Discriminator REAL
![Page 28: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/28.jpg)
Enter the discriminatorThe discriminator tries to tell whether a sample is real or fake.
Discriminator FAKE
![Page 29: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/29.jpg)
Enter the discriminatorThe discriminator tries to tell whether a sample is real or fake.
Discriminator REAL
![Page 30: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/30.jpg)
Enter the discriminatorThe discriminator tries to tell whether a sample is real or fake.
Discriminator FAKE
![Page 31: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/31.jpg)
The whole pictureGenerator attempts to create a data point.
DiscriminatorGenerator
![Page 32: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/32.jpg)
The whole pictureIf this generated point is NOT close to the real points in the space…
DiscriminatorGenerator
![Page 33: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/33.jpg)
The whole pictureThe discriminator will easily say that it’s a fake point.
DiscriminatorGenerator FAKE
![Page 34: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/34.jpg)
The whole pictureBut if the generated point IS close to a real point…
DiscriminatorGenerator
![Page 35: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/35.jpg)
The whole pictureThen the discriminator might be fooled!
DiscriminatorGenerator REAL
![Page 36: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/36.jpg)
Generator’s goalFool the discriminator into thinking the generated points are real.
DiscriminatorGenerator REAL
![Page 37: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/37.jpg)
Discriminator’s goalDon’t be fooled by the generator.
DiscriminatorGenerator FAKE
![Page 38: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/38.jpg)
Generator takes as input a latent codeThe output of the generator is conditioned on random noise.
DiscriminatorGenerator REAL
Late
nt c
ode
![Page 39: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/39.jpg)
Generator takes as input a latent codeThe generator interprets this random noise as a point on a manifold.
DiscriminatorGenerator REAL
Late
nt c
ode
![Page 40: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/40.jpg)
Generator takes as input a latent code…and maps points on the manifold to a point in the space of the data.
DiscriminatorGenerator REAL
Late
nt c
ode
![Page 41: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/41.jpg)
Key points
Generator
Latent code
To create good fake data, a generator must know what real data looks like.
The generator attempts to generate samples that are likely under the true distribution.
The distribution is learned implicitly via the discriminator.
![Page 42: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/42.jpg)
Key points
The discriminator learns how to tell real data from fake data.
Thus, a GAN is like learning your loss function, rather than keeping it fixed! Discriminator
REAL or FAKE
![Page 43: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/43.jpg)
This is a game with two players!Player 1: The Generator Player 2: The Discriminator
DiscriminatorGenerator REAL
Late
nt c
ode
![Page 44: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/44.jpg)
This is a game with two players!Player 1: The Generator Player 2: The Discriminator
DiscriminatorGenerator REAL
Late
nt c
ode
Generator is a deep network!
Discriminator is a deep network!
![Page 45: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/45.jpg)
This is a game with two players!Each player seeks to maximize its own success and minimize the success of the other -> a minimax game
DiscriminatorGenerator REAL
Late
nt c
ode
Generator is a deep network!
Discriminator is a deep network!
![Page 46: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/46.jpg)
This is a game with two players!The two players are at odds with one another and are trained in an alternating fashion.
DiscriminatorGenerator REAL
Late
nt c
ode
Generator is a deep network!
Discriminator is a deep network!
![Page 47: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/47.jpg)
Keep the generator fixed. Generate a bunch of fake points.
DiscriminatorGenerator REAL
Late
nt c
ode
At first, the generator has no idea how to create fake points. The data is not close to the real points.
![Page 48: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/48.jpg)
Take a bunch of real points…
DiscriminatorGenerator REAL
Late
nt c
ode
…and feed them to the discriminator. The discriminator should output that these are real points. Use this as a training signal and backprop to train the discriminator.
FAKE
REAL
FAKE
REAL
![Page 49: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/49.jpg)
Take a bunch of real points…
DiscriminatorGenerator REAL
Late
nt c
ode
…and feed them to the discriminator. The discriminator should output that these are real points. Use this as a training signal and backprop to train the discriminator.
FAKE
REAL
FAKE
REAL
Backprop“REAL/FAKE” loss to discriminator
![Page 50: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/50.jpg)
Take a bunch of fake points…
DiscriminatorGenerator FAKE
Late
nt c
ode
…and feed them to the discriminator. The discriminator should output that these are fake points.
REAL
FAKE
REAL
FAKE
Backprop“REAL/FAKE” loss to discriminator
![Page 51: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/51.jpg)
Now keep discriminator fixed. Generate fake points again…
DiscriminatorGenerator
Late
nt c
ode
This time we will update the generator instead. Note how different points may be generated this time - this is due to the randomness of the latent code.
![Page 52: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/52.jpg)
Take these fake points…
DiscriminatorGenerator
Late
nt c
ode
…and feed them to the discriminator. This time, we want the generator to fool the discriminator.
FAKE
FAKE
FAKE
FAKE
FAKE
![Page 53: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/53.jpg)
Take these fake points…
DiscriminatorGenerator
Late
nt c
ode
However the generator doesn’t know the true data distribution yet! So the discriminator easily catches that we are making forgeries.
FAKE
FAKE
FAKE
FAKE
FAKE
![Page 54: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/54.jpg)
Update the generator.
DiscriminatorGenerator
Late
nt c
ode
Update the generator by backpropping through the discriminator.
Backprop negation of “REAL/FAKE” loss to generator.
FAKE
FAKE
FAKE
FAKE
FAKE
![Page 55: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/55.jpg)
Alternate between generator updates and discriminator updates.
DiscriminatorGenerator
Late
nt c
ode
REAL
REAL
FAKE
REAL
FAKE
Backprop“REAL/FAKE” loss to discriminator
Train the discriminator to tell fake points from real points…
![Page 56: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/56.jpg)
Alternate between generator updates and discriminator updates.
DiscriminatorGenerator
Late
nt c
ode
Generate new fake points…
![Page 57: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/57.jpg)
Alternate between generator updates and discriminator updates.
DiscriminatorGenerator
Late
nt c
ode
FAKE
FAKE
REAL
REAL
REAL
Backprop negation of “REAL/FAKE” loss to generator.
Update the generator to fool the discriminator.
![Page 58: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/58.jpg)
Alternate between generator updates and discriminator updates.
DiscriminatorGenerator
Late
nt c
ode
As this process continues…
![Page 59: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/59.jpg)
Alternate between generator updates and discriminator updates.
DiscriminatorGenerator
Late
nt c
ode
…the generator will start to put its generated points near the real points…
![Page 60: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/60.jpg)
Alternate between generator updates and discriminator updates.
DiscriminatorGenerator
Late
nt c
ode
..leading to the discriminator to believe they are real points!
REAL
REAL
REAL
REAL
REAL
![Page 61: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/61.jpg)
Time to add a bit of math
Credit to Bhiksha Raj at CMU for these images!
![Page 62: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/62.jpg)
Time to add a bit of math
Credit to Bhiksha Raj at CMU for these images!
![Page 63: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/63.jpg)
Time to add a bit of math
Credit to Bhiksha Raj at CMU for these images!
![Page 64: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/64.jpg)
Time to add a bit of math
Credit to Bhiksha Raj at CMU for these images!
Intuition: how do you tell two coins apart?
Flip them and compare them to what you expect.
![Page 65: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/65.jpg)
Time to add a bit of math
Credit to Bhiksha Raj at CMU for these images!
Green: you want high likelihood that x is real (because it is).
Red: you want low likelihood that G(z) is real (because it isn’t).
![Page 66: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/66.jpg)
Time to add a bit of math
Credit to Bhiksha Raj at CMU for these images!
D(x) -> coin flip for D on x
D(G(z)) -> coin flip for D on G(x)
![Page 67: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/67.jpg)
Time to add a bit of math
Credit to Bhiksha Raj at CMU for these images!
Expect 1, try to get 1
Expect 0, try to get 0
![Page 68: Generative Adversarial Networks - GitHub PagesGenerative adversarial networks. Abstracting a bit The goal is to be able to construct points similar to the real points. Generator. Abstracting](https://reader030.vdocuments.us/reader030/viewer/2022040116/5ecde339c9dc5a794236dd79/html5/thumbnails/68.jpg)
Time to add a bit of math
Credit to Bhiksha Raj at CMU for these images!