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

snapshot...

parent 7ee9b915
No related branches found
No related tags found
No related merge requests found
......@@ -572,7 +572,7 @@ class IcingIntensityFCN:
def setup_eval_pipeline(self, data_dct, num_tiles=1):
self.data_dct = data_dct
# self.cth_max = data_dct.get('cth_high_avg', None)
self.cth_max = data_dct.get('cth_high_avg', None)
idxs = np.arange(num_tiles)
self.num_data_samples = idxs.shape[0]
......@@ -1157,13 +1157,7 @@ def run_evaluate_static(data_dct, num_tiles, ckpt_dir_s_path, day_night='DAY', l
return preds_dct, probs_dct
def run_evaluate_static_2(model, data_dct, num_tiles, prob_thresh=0.5, flight_levels=[0, 1, 2, 3, 4],
use_flight_altitude=False, use_max_cth_level=False):
model.cth_max = None
flight_levels = flight_levels.copy()
if not use_flight_altitude:
flight_levels = [0]
def run_evaluate_static_2(model, data_dct, num_tiles, prob_thresh=0.5, flight_levels=[0, 1, 2, 3, 4]):
probs_dct = {flvl: None for flvl in flight_levels}
preds_dct = {flvl: None for flvl in flight_levels}
......@@ -1176,16 +1170,6 @@ def run_evaluate_static_2(model, data_dct, num_tiles, prob_thresh=0.5, flight_le
probs_dct[flvl] = model.test_probs.flatten()
preds_dct[flvl] = model.test_preds.flatten()
if use_max_cth_level:
flvl = 5
model.cth_max = data_dct.get('cth_high_avg', None)
model.flight_level = flvl
model.setup_eval_pipeline(data_dct, num_tiles)
model.do_evaluate(prob_thresh=prob_thresh)
probs_dct[flvl] = model.test_probs.flatten()
preds_dct[flvl] = model.test_preds.flatten()
return preds_dct, probs_dct
......
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