1
$\begingroup$

Loss function for discriminator, which needs to be maximized: -log(D(x)) + log(1-D(G(z))). Loss function for generator, which needs to be maximized: log(D(G(z)))

What would the calculation of the loss gradient of the output value of the discriminator look like? What would the calculation of the loss gradient of the generator output look like?

$\endgroup$
1
  • $\begingroup$ Those gradients depend on the specific functions implemented by Generator and Discriminator. $\endgroup$
    – noe
    Commented May 24, 2023 at 16:13

1 Answer 1

0
$\begingroup$

The loss gradient of the output value of the discriminator could be calculated as follows:

  • For real data, the gradient would be -1/D(x) since we want to maximize the log likelihood of D(x) and hence we move in the direction that minimizes D(x).

  • For generated data, the gradient could be 1/(1 - D(G(z))) since we want to maximize the log likelihood of 1 - D(G(z)) and hence we move in the direction that maximizes 1 - D(G(z)).

The loss gradient of the generator output could be calculated as follows:

  • The gradient could be 1/D(G(z)) since we want to maximize the log likelihood of D(G(z)) and hence we move in the direction that maximizes D(G(z)).
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.