diff --git a/modules/deeplearning/icing_cnn.py b/modules/deeplearning/icing_cnn.py index 58dd9c05dad70c49a140c674bbf49772ce1c9506..36a6c57f141ef914098816fb8068f7e8e4f4c6f2 100644 --- a/modules/deeplearning/icing_cnn.py +++ b/modules/deeplearning/icing_cnn.py @@ -215,8 +215,8 @@ class IcingIntensityNN: label = np.where(label != 0, 1, label) label = label.reshape((label.shape[0], 1)) elif NumClasses == 3: - label = np.where((label == 1 | label == 2), 1, label) - label = np.where((label == 3 | label == 4 | label == 5 | label == 6), 2, label) + label = np.where(np.logical_or(label == 1, label == 2), 1, label) + label = np.where(np.invert(np.logical_or(label == 0, label == 1)), 2, label) if CACHE_DATA_IN_MEM: self.in_mem_data_cache[key] = (data, label)