Skip to content

Why the losses for generator is like that? #18

Description

@kunrenzhilu

rewards = _backwards_cumsum(decays * tf.sigmoid(self.d_gen_predictions), self.sequence_length)
self.g_loss = \ -tf.reduce_mean(tf.log(self.gen_o.stack()) * normalized_rewards)
I think the key to understand your code's reinforcement learning part is the above two lines. But, why the g_loss is in such a equation? Could you provide any reference or formula? Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions