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

snapshot...

parent a5f7ff85
Branches
No related tags found
No related merge requests found
......@@ -1191,18 +1191,18 @@ def run_evaluate_static_avg(ckpt_dir_s_path, day_night='NIGHT', l1b_andor_l2='BO
sum += w
avg_weights = sum / len(weight_s)
# ---------------------------------------------
# -- Make a new model for the averaged weights
new_model = IcingIntensityFCN(day_night=day_night, l1b_or_l2=l1b_andor_l2, use_flight_altitude=use_flight_altitude)
new_model.build_model()
new_model.build_training()
new_model.build_evaluation()
if ckpt_dir is None:
# -- save the averaged weights to a new the model
if not os.path.exists(modeldir):
os.mkdir(modeldir)
ckpt = tf.train.Checkpoint(step=tf.Variable(1), model=new_model.model)
ckpt_manager = tf.train.CheckpointManager(ckpt, modeldir, max_to_keep=3)
new_model.model.set_weights(avg_weights)
ckpt_manager.save()
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment