Skip to content

Commit

Permalink
Merge pull request vanhuyz#15 from vanhuyz/correct_history
Browse files Browse the repository at this point in the history
Correct history
  • Loading branch information
vanhuyz authored May 14, 2017
2 parents a8c0a5e + 56d3fa9 commit a5881bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ def train():

try:
step = 0
fake_Y_pool = ImagePool(FLAGS.pool_size)
fake_X_pool = ImagePool(FLAGS.pool_size)

while not coord.should_stop():
# update previously generated images
# get previously generated images
fake_y_val, fake_x_val = sess.run([fake_y, fake_x])
fake_Y_pool = ImagePool(FLAGS.pool_size)
fake_X_pool = ImagePool(FLAGS.pool_size)

# train
_, G_loss_val, D_Y_loss_val, F_loss_val, D_X_loss_val, summary = (
Expand Down
2 changes: 1 addition & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def query(self, image):
p = random.random()
if p > 0.5:
# use old image
random_id = random.sample(range(self.pool_size))
random_id = random.randrange(0, self.pool_size)
tmp = self.images[random_id].copy()
self.images[random_id] = image.copy()
return tmp
Expand Down

0 comments on commit a5881bb

Please sign in to comment.