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

snapshot...

parent a1821112
No related branches found
No related tags found
No related merge requests found
...@@ -572,7 +572,7 @@ class IcingIntensityFCN: ...@@ -572,7 +572,7 @@ class IcingIntensityFCN:
def setup_eval_pipeline(self, data_dct, num_tiles=1): def setup_eval_pipeline(self, data_dct, num_tiles=1):
self.data_dct = data_dct 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) idxs = np.arange(num_tiles)
self.num_data_samples = idxs.shape[0] self.num_data_samples = idxs.shape[0]
...@@ -1160,9 +1160,12 @@ def run_evaluate_static(data_dct, num_tiles, ckpt_dir_s_path, day_night='DAY', l ...@@ -1160,9 +1160,12 @@ def run_evaluate_static(data_dct, num_tiles, ckpt_dir_s_path, day_night='DAY', l
def run_evaluate_static_2(model, data_dct, num_tiles, prob_thresh=0.5, flight_levels=[0, 1, 2, 3, 4], 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): use_flight_altitude=False, use_max_cth_level=False):
if not use_flight_altitude or use_max_cth_level: if not use_flight_altitude:
flight_levels = [0] flight_levels = [0]
if use_max_cth_level:
flight_levels.append(5)
probs_dct = {flvl: None for flvl in flight_levels} probs_dct = {flvl: None for flvl in flight_levels}
preds_dct = {flvl: None for flvl in flight_levels} preds_dct = {flvl: None for flvl in flight_levels}
...@@ -1174,6 +1177,18 @@ def run_evaluate_static_2(model, data_dct, num_tiles, prob_thresh=0.5, flight_le ...@@ -1174,6 +1177,18 @@ def run_evaluate_static_2(model, data_dct, num_tiles, prob_thresh=0.5, flight_le
probs_dct[flvl] = model.test_probs.flatten() probs_dct[flvl] = model.test_probs.flatten()
preds_dct[flvl] = model.test_preds.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 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