2
$\begingroup$

In the Generative Adversarial Network loss function, what do these mean?: $E_{x~p_{data}(x)}$ and $E_{z~p_{z}(z)}$ and how are they used in this context?

$\endgroup$

1 Answer 1

1
$\begingroup$

Generally, the notation $\mathbb{E}_{x\sim p}f(x)$ or $\mathbb{E}_{x\sim p(x)}f(x)$ refers to the expectation of $f(x)$ with respect to the distribution $p$ for variable $x$ (e.g. see the explanation in the notation section in "Pattern Recognition and Machine Learning" by Bishop).

In the context of GANs, it means that for an objective function such as $$\mathbb{E}_{x\sim p_{data}(x)}[logD(x)] + \mathbb{E}_{z\sim p_z(z)}[log(1 - D(G(z)))]$$ the first summand is the expectation with regards to $x$ coming from the data and the second summand is the expectation with regards to $z$ which you sample from $p_z$ as an input for G.

Since the first summand stands for correctly classified real data (coming from $p_{data}$) and the second summand stands for correctly as fake classified images coming from G using $z$ sampled from $p_z$, D tries to maximize this expression. And G does the opposite.

$\endgroup$

Your Answer

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

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