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

snapshot...

parent bb8912d9
Branches
No related tags found
No related merge requests found
...@@ -588,7 +588,7 @@ class SRCNN: ...@@ -588,7 +588,7 @@ class SRCNN:
labels = tf.squeeze(labels, axis=[3]) labels = tf.squeeze(labels, axis=[3])
with tf.GradientTape() as tape: with tf.GradientTape() as tape:
# pred = self.model([inputs], training=True) # pred = self.model([inputs], training=True)
pred = self.model(inputs, training=True) pred = self.model({'2km':inputs[0], 'hkm':inputs[1]}, training=True)
loss = self.loss(labels, pred) loss = self.loss(labels, pred)
total_loss = loss total_loss = loss
if len(self.model.losses) > 0: if len(self.model.losses) > 0:
...@@ -608,7 +608,7 @@ class SRCNN: ...@@ -608,7 +608,7 @@ class SRCNN:
def test_step(self, inputs, labels): def test_step(self, inputs, labels):
labels = tf.squeeze(labels, axis=[3]) labels = tf.squeeze(labels, axis=[3])
# pred = self.model([inputs], training=False) # pred = self.model([inputs], training=False)
pred = self.model(inputs, training=False) pred = self.model({'2km':inputs[0], 'hkm':inputs[1]}, training=False)
t_loss = self.loss(labels, pred) t_loss = self.loss(labels, pred)
self.test_loss(t_loss) self.test_loss(t_loss)
...@@ -618,7 +618,7 @@ class SRCNN: ...@@ -618,7 +618,7 @@ class SRCNN:
# decorator commented out because pred.numpy(): pred not evaluated yet. # decorator commented out because pred.numpy(): pred not evaluated yet.
def predict(self, inputs, labels): def predict(self, inputs, labels):
# pred = self.model([inputs], training=False) # pred = self.model([inputs], training=False)
pred = self.model(inputs, training=False) pred = self.model({'2km':inputs[0], 'hkm':inputs[1]}, training=False)
# t_loss = self.loss(tf.squeeze(labels, axis=[3]), pred) # t_loss = self.loss(tf.squeeze(labels, axis=[3]), pred)
t_loss = self.loss(labels, pred) t_loss = self.loss(labels, pred)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment