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

snapshot...

parent 61832776
No related branches found
No related tags found
No related merge requests found
......@@ -357,32 +357,11 @@ def run_icing_predict_image(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output
model_module = icing_fcn
if day_model_path is not None:
ckpt_dir_s = os.listdir(day_model_path)
ckpt_dir = day_model_path + ckpt_dir_s[0]
day_model = IcingIntensityFCN(day_night='DAY', l1b_or_l2=l1b_andor_l2, satellite=satellite, use_flight_altitude=use_flight_altitude)
day_model.num_data_samples = 10000
day_model.build_model()
day_model.build_training()
day_model.build_evaluation()
ckpt = tf.train.Checkpoint(step=tf.Variable(1), model=day_model.model)
ckpt_manager = tf.train.CheckpointManager(ckpt, ckpt_dir, max_to_keep=3)
ckpt.restore(ckpt_manager.latest_checkpoint)
day_model = model_module.load_model(day_model_path, day_night='DAY', l1b_andor_l2=l1b_andor_l2,
satellite=satellite, use_flight_altitude=use_flight_altitude)
if night_model_path is not None:
ckpt_dir_s = os.listdir(night_model_path)
ckpt_dir = night_model_path + ckpt_dir_s[0]
night_model = IcingIntensityFCN(day_night='NIGHT', l1b_or_l2=l1b_andor_l2, satellite=satellite, use_flight_altitude=use_flight_altitude)
night_model.num_data_samples = 10000
night_model.build_model()
night_model.build_training()
night_model.build_evaluation()
ckpt = tf.train.Checkpoint(step=tf.Variable(1), model=night_model.model)
ckpt_manager = tf.train.CheckpointManager(ckpt, ckpt_dir, max_to_keep=3)
ckpt.restore(ckpt_manager.latest_checkpoint)
night_model = model_module.load_model(night_model_path, day_night='NIGHT', l1b_andor_l2=l1b_andor_l2,
satellite=satellite, use_flight_altitude=use_flight_altitude)
alt_lo, alt_hi = 0.0, 15000.0
if use_flight_altitude is True:
......@@ -487,11 +466,11 @@ def run_icing_predict_image(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output
for ds_name in day_train_params:
day_grd_dct[ds_name] = np.stack(day_data_dct[ds_name])
preds_day_dct, probs_day_dct = model_module.run_evaluate_static_2(day_model, day_grd_dct, num_day_tiles, day_cth_max,
day_night='DAY', l1b_or_l2=l1b_andor_l2,
prob_thresh=prob_thresh,
use_flight_altitude=use_flight_altitude,
flight_levels=flight_levels)
preds_day_dct, probs_day_dct = \
model_module.run_evaluate_static_2(day_model, day_grd_dct, num_day_tiles, day_cth_max, day_night='DAY',
l1b_or_l2=l1b_andor_l2, prob_thresh=prob_thresh,
use_flight_altitude=use_flight_altitude,
flight_levels=flight_levels)
day_idxs = np.array(day_idxs)
for flvl in flight_levels:
......@@ -512,11 +491,10 @@ def run_icing_predict_image(clvrx_dir='/Users/tomrink/data/clavrx/RadC/', output
for ds_name in nght_train_params:
nght_grd_dct[ds_name] = np.stack(nght_data_dct[ds_name])
preds_nght_dct, probs_nght_dct = model_module.run_evaluate_static_2(night_model, nght_grd_dct, num_nght_tiles, nght_cth_max,
day_night='NIGHT', l1b_or_l2=l1b_andor_l2,
prob_thresh=prob_thresh,
use_flight_altitude=use_flight_altitude,
flight_levels=flight_levels)
preds_nght_dct, probs_nght_dct = \
model_module.run_evaluate_static_2(night_model, nght_grd_dct, num_nght_tiles, nght_cth_max,
day_night='NIGHT', l1b_or_l2=l1b_andor_l2, prob_thresh=prob_thresh,
use_flight_altitude=use_flight_altitude, flight_levels=flight_levels)
nght_idxs = np.array(nght_idxs)
for flvl in flight_levels:
nght_preds = preds_nght_dct[flvl]
......
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