From 39e6f313e23cb1f1f86d1427345269c01b0ebf53 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Tue, 27 Apr 2021 11:48:42 -0500 Subject: [PATCH] initial commit --- modules/deeplearning/icing_cnn.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/deeplearning/icing_cnn.py b/modules/deeplearning/icing_cnn.py index 6ff32522..7b209117 100644 --- a/modules/deeplearning/icing_cnn.py +++ b/modules/deeplearning/icing_cnn.py @@ -206,15 +206,15 @@ class IcingIntensityNN: label = np.where(label == -1, 0, label) # binary, two class + #label = np.where(label != 0, 1, label) + #label = label.reshape((label.shape[0], 1)) + + keep = (label == 0) | (label == 3) | (label == 4) | (label == 5) | (label == 6) + data = data[keep,] + label = label[keep] label = np.where(label != 0, 1, label) label = label.reshape((label.shape[0], 1)) - # keep = (label == 0) | (label == 3) | (label == 4) | (label == 5) | (label == 6) - # data = data[keep,] - # label = label[keep] - # label = np.where(label != 0, 1, label) - # label = label.reshape((label.shape[0], 1)) - if CACHE_DATA_IN_MEM: self.in_mem_data_cache[key] = (data, label) -- GitLab