Skip to content
Snippets Groups Projects
Commit 303187b5 authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 070fd9fa
No related branches found
No related tags found
No related merge requests found
......@@ -93,8 +93,9 @@ class Trainer(object):
with tf.GradientTape() as tape:
fake = generator.unsigned_call(image_lr)
loss_mae = utils.pixel_loss(image_hr, fake) * (1.0 / self.batch_size)
# loss_mse = utils.pixel_loss_mse(image_hr, fake) * (1.0 / self.batch_size)
loss = loss_mae
loss_mse = utils.pixel_loss_mse(image_hr, fake) * (1.0 / self.batch_size)
# loss = loss_mae
loss = loss_mse
mean_loss = metric(loss_mae)
psnr_metric(tf.reduce_mean(tf.image.psnr(fake, image_hr, max_val=PSNR_MAX)))
# gen_vars = list(set(generator.trainable_variables))
......@@ -114,6 +115,7 @@ class Trainer(object):
for epoch in range(NUM_WU_EPOCHS):
print('start epoch #: ', epoch)
metric.reset_states()
for image_lr, image_hr in self.dataset:
num_steps = train_step(image_lr, image_hr)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment