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

snapshot...

parent 88daf8cf
No related branches found
No related tags found
No related merge requests found
...@@ -993,7 +993,7 @@ class IcingIntensityFCN: ...@@ -993,7 +993,7 @@ class IcingIntensityFCN:
def restore(self, ckpt_dir): def restore(self, ckpt_dir):
if TRACK_MOVING_AVERAGE: if TRACK_MOVING_AVERAGE:
ckpt = tf.train.Checkpoint(step=tf.Variable(1), model=self.model, averaged_weights=self.model.trainable_variables) ckpt = tf.train.Checkpoint(step=tf.Variable(1), model=self.model, model_weights=self.model.trainable_variables, averaged_weights=self.ema_trainable_variables)
else: else:
ckpt = tf.train.Checkpoint(step=tf.Variable(1), model=self.model) ckpt = tf.train.Checkpoint(step=tf.Variable(1), model=self.model)
...@@ -1001,6 +1001,9 @@ class IcingIntensityFCN: ...@@ -1001,6 +1001,9 @@ class IcingIntensityFCN:
ckpt.restore(ckpt_manager.latest_checkpoint) ckpt.restore(ckpt_manager.latest_checkpoint)
for idx, var in enumerate(self.model.trainable_variables):
var.assign(self.ema_trainable_variables[idx])
self.reset_test_metrics() self.reset_test_metrics()
for data0, data1, label in self.test_dataset: for data0, data1, label in self.test_dataset:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment