Heuristic loss

There is no change in the loss function of the discriminator. It can be directly written as follows:

Now, let's look at the generator loss:

Can we change the minimization objective in our generator loss function into a maximization objective just like the discriminator loss? How can we do that? We know that returns the probability of the fake input image being fake, and the generator is minimizing this probability.

Instead of doing this, we can write . It implies the probability of the fake input image being real, and now the generator can maximize this probability. It implies a generator is maximizing the probability of the fake input image being classified as a real image. So, the loss function of our generator now becomes the following:

So now, we have both the loss function of our discriminator and generator in maximizing terms:

But, instead of maximizing, if we can minimize the loss, then we can apply our favorite gradient descent algorithm. So, how can we convert our maximizing problem into a minimization problem? We can do that by simply adding a negative sign.

So, our final loss function for the discriminator is given as follows:

Also, the generator loss is given as follows:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset