Answers.Body: <p>Assuming that there is no other trickery done in the book regarding notation, I'd say this value function is wrong. Minimizing <code>log(log(x))</code> is similar to minimizing <code>log(x)</code>. However, <code>log(log(x))</code> indeed cannot take values lower than 1, which is what the discriminator would output.</p>
  <p>Maybe someone else who has access to the book can clarify exactly how they come to the value function they use. Until then, I'd recommend simply thinking of the value function that is used in the original GAN paper (Goodfellow et al. 2014)</p>
  <p><span class="math-container">$$min_Gmax_D(D,G)=E[log(D(x))] + E[log(1-D(G(x)))]$$</span></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-04-14T14:24:49.890Z
Answers.LastActivityDate: 2023-05-14T15:25:15.250Z
Answers.LastEditDate: 2023-05-14T15:25:15.250Z
Answers.UserDisplayName: Robin van Hoorn
Body: <p>In the book Generative AI with Python and TensorFlow 2 from Babcock and Bali (page 172), it is stated that the value function of a GAN is the following:</p>
  <p><a href="https://i.sstatic.net/ZP7pp.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ZP7pp.png" alt="value function of GAN" /></a></p>
  <p>where D(x) is the output of the discriminator and G(z) is the output of the generator. However I don't understand why there is a product of two logarithms. The value D(x) is supposed to be a probability, meaning that D(x) lies in the number interval between 0 and 1. Having that into account the log D(x) would be a negative number, so log log D(x) shouldn't exist because the log of a negative number doesn't exist.</p>
  <p>Can anyone shed some light into this? Is the function wrong or is there anything I am missing?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-04-17T12:00:31.890Z
Comments.Text: Instead of writing "Query regarding...", can you please just put your **specific question** in the title?
Comments.UserDisplayName: nbro
Tags: <deep-learning><generative-adversarial-networks><value-functions><minimax><logarithm>
Title: Query regarding the minimax value function of GANs
UserDisplayName: Claudia P
ThreadText: # Query regarding the minimax value function of GANs
  
  (Asked by: username_0 on 2023-04-14)
  
  In the book Generative AI with Python and TensorFlow 2 from Babcock and Bali (page 172), it is stated that the value function of a GAN is the following:
  
  [![value function of GAN](https://i.sstatic.net/ZP7pp.png)](https://i.sstatic.net/ZP7pp.png)
  
  where D(x) is the output of the discriminator and G(z) is the output of the generator. However I don't understand why there is a product of two logarithms. The value D(x) is supposed to be a probability, meaning that D(x) lies in the number interval between 0 and 1. Having that into account the log D(x) would be a negative number, so log log D(x) shouldn't exist because the log of a negative number doesn't exist.
  
  Can anyone shed some light into this? Is the function wrong or is there anything I am missing?
  
  **Tags:** deep-learning, generative-adversarial-networks, value-functions, minimax, logarithm
  
  > **Comments:**
  > **username_1**: Instead of writing "Query regarding...", can you please just put your **specific question** in the title?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2023-04-14. Score: 0
  
  Assuming that there is no other trickery done in the book regarding notation, I'd say this value function is wrong. Minimizing `log(log(x))` is similar to minimizing `log(x)`. However, `log(log(x))` indeed cannot take values lower than 1, which is what the discriminator would output.
  
  Maybe someone else who has access to the book can clarify exactly how they come to the value function they use. Until then, I'd recommend simply thinking of the value function that is used in the original GAN paper (Goodfellow et al. 2014)
  
  $$min\_Gmax\_D(D,G)=E[log(D(x))] + E[log(1-D(G(x)))]$$
  
  
  ---
  
  