diff --git a/modules/deeplearning/icing_fcn.py b/modules/deeplearning/icing_fcn.py index d5607669dac0e3dde1aca914431d34583834aeea..b89faa9284089da27cf71eee1af21d77bf6da80b 100644 --- a/modules/deeplearning/icing_fcn.py +++ b/modules/deeplearning/icing_fcn.py @@ -1188,6 +1188,7 @@ def run_average_models(ckpt_dir_s_path, day_night='NIGHT', l1b_andor_l2='BOTH', model = load_model(ckpt_dir, day_night=day_night, l1b_andor_l2=l1b_andor_l2, use_flight_altitude=use_flight_altitude) k_model = model.model model_weight_s.append(k_model.get_weights()) + print('done loading models ******************************************') avg_model_weights = [] for m in model_weight_s: @@ -1204,13 +1205,13 @@ def run_average_models(ckpt_dir_s_path, day_night='NIGHT', l1b_andor_l2='BOTH', new_model.build_evaluation() # -- 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() + # 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() return