Skip to content
Snippets Groups Projects
Commit 094650f6 authored by tomrink's avatar tomrink
Browse files

snapshot...

parent f947f11b
No related branches found
No related tags found
No related merge requests found
......@@ -134,8 +134,7 @@ class Trainer(object):
"warmup_loss", metric.result(), step=G_optimizer.iterations)
tf.summary.scalar("mean_psnr", psnr_metric.result(), G_optimizer.iterations)
# if not num_steps % self.settings["print_step"]: # test
if True:
if not num_steps % self.settings["print_step"]:
logging.info(
"[WARMUP] Step: {}\tGenerator Loss: {}"
"\tPSNR: {}\tTime Taken: {} sec".format(
......@@ -302,8 +301,7 @@ class Trainer(object):
tf.summary.scalar("mean_psnr", psnr_metric.result(), step=D_optimizer.iterations)
# Logging and Checkpointing
# if not num_step % self.settings["print_step"]: # testing
if True:
if not num_step % self.settings["print_step"]:
logging.info(
"Step: {}\tGen Loss: {}\tDisc Loss: {}"
"\tPSNR: {}\tTime Taken: {} sec".format(
......@@ -312,7 +310,7 @@ class Trainer(object):
disc_metric.result(),
psnr_metric.result(),
time.time() - start))
# if psnr_metric.result() > last_psnr:
last_psnr = psnr_metric.result()
utils.save_checkpoint(checkpoint, "phase_2", self.model_dir)
if psnr_metric.result() > last_psnr:
last_psnr = psnr_metric.result()
utils.save_checkpoint(checkpoint, "phase_2", self.model_dir)
start = time.time()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment