diff --git a/modules/deeplearning/icing_fcn.py b/modules/deeplearning/icing_fcn.py index 781561e15a2e51fbca4813933153b9212013f64e..3d31fad05325b512bd07ece70d6f8275d2615388 100644 --- a/modules/deeplearning/icing_fcn.py +++ b/modules/deeplearning/icing_fcn.py @@ -397,9 +397,8 @@ class IcingIntensityFCN: data = np.transpose(data, axes=(1, 2, 0)) data = np.expand_dims(data, axis=0) - # TODO: altitude data will be specified by user at run-time - nda = np.zeros([data.shape[1]*data.shape[2]]) - nda[:] = self.flight_level + nda = np.zeros([1]) + nda[0] = self.flight_level nda = tf.one_hot(nda, 5).numpy() return data, nda @@ -445,9 +444,7 @@ class IcingIntensityFCN: indexes = list(indexes) dataset = tf.data.Dataset.from_tensor_slices(indexes) - # dataset = dataset.batch(PROC_BATCH_SIZE) dataset = dataset.map(self.data_function_evaluate, num_parallel_calls=8) - # dataset = dataset.cache() self.eval_dataset = dataset def setup_pipeline(self, filename_l1b_trn, filename_l1b_tst, filename_l2_trn, filename_l2_tst, trn_idxs=None, tst_idxs=None, seed=None): @@ -990,12 +987,7 @@ class IcingIntensityFCN: self.reset_test_metrics() pred_s = [] - # for data in self.eval_dataset: - # ds = tf.data.Dataset.from_tensor_slices(data) - # ds = ds.batch(BATCH_SIZE) - # for mini_batch in ds: - # pred = self.model([mini_batch], training=False) - # pred_s.append(pred) + for data in self.eval_dataset: print(data[0].shape, data[1].shape) pred = self.model([data])