Skip to content

train.py里的两个问题(discriminator的loss & 更新频率) #4

Description

@kemingzeng

关于loss

self.d_l_1, self.d_l_2 = d_loss_r - d_loss_f, s_l_r
self.d_loss = -d_loss_r + d_loss_f + s_l_r*self.flag*10 + d_regular

  1. 其中69行的 d_loss_r - d_loss_f 为什么是减?
  2. 70行 -d_loss_r 为什么会有一个负号?

还没跑,看着蛮奇怪的。

关于D更新k次,G更新1次

# update the Discrimater k times
_, loss_d, d1,d2 = self.sess.run(d_opt, feed_dict=feed)
# update the Generator one time
_, loss_g = self.sess.run(g_opt, feed_dict=feed)

代码里貌似没有反映出来吧?

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