Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

g_loss function #35

Open
Shiba727 opened this issue Apr 18, 2021 · 2 comments
Open

g_loss function #35

Shiba727 opened this issue Apr 18, 2021 · 2 comments

Comments

@Shiba727
Copy link

According to the paper, the objective of RL is to get a larger reward, if the output of the discriminative model gets larger, means that D see generated as a true one.
However, we found that there are some questions in the following code snippet :

self.gan_loss = -tf.reduce_mean(tf.log(self.i_prob) * self.reward) + self.lamda * ( tf.nn.l2_loss(self.u_embedding) + tf.nn.l2_loss(self.i_embedding) + tf.nn.l2_loss(self.i_bias))
Q1. Ignore the regulation, the tf.log(self.i_prob) should be negative and self.reward may be negative or positive, thus, when reward is positive the above function will minimize value of the reward, which is opposite to the RL design statement and concept of GAN.

Could you explain the reason why self.reward may be negative or positive?

Please correct me if there's anything wrong, thank you!

@cow505285
Copy link

Have same question !

@JulianSe26
Copy link

I think the learning goal of G is not to maximize the reward, since the reward is detached anyway. Rather it will learn to assign high probabilties for samples which give high reward to achieve minimization of log(~1) = ~0 which is consistent with the overall objective.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants