Skip to content

Commit

Permalink
enforce range of values condition on k_t
Browse files Browse the repository at this point in the history
  • Loading branch information
gokul-uf committed May 26, 2017
1 parent 8aa4d45 commit 07f79d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def get_img_batch(img_ids, loc = conf.data_location, img_shape = (conf.img_heigh
print("Epoch : {}".format(i+1))
print("M_global: {}, G Loss: {}, D Loss: {}".format(M_global, g_loss, d_loss))
k_t_input += conf.lambda_k*(conf.gamma*epoch_l_x - epoch_l_g_g)
k_t_input = max(min(1, k_t_input), 0) # to ensure 0 <= k_t_input <= 1

if i % conf.sample_epoch == 0:
print("Sampling Images")
Expand Down

0 comments on commit 07f79d1

Please sign in to comment.