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
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