diff --git a/modules/deeplearning/icing_fcn.py b/modules/deeplearning/icing_fcn.py index 3d041bbbce0a4e7b9b6fa1adda4bdece7da8b976..0e4d6db76c1ef2576391c3b5596ed3361b41baa7 100644 --- a/modules/deeplearning/icing_fcn.py +++ b/modules/deeplearning/icing_fcn.py @@ -241,8 +241,8 @@ class IcingIntensityFCN: self.X_img = tf.keras.Input(shape=(None, None, n_chans)) self.inputs.append(self.X_img) - self.inputs.append(tf.keras.Input(shape=(None, None, 5))) - #self.inputs.append(tf.keras.Input(shape=(None, None, 3))) + #self.inputs.append(tf.keras.Input(shape=(None, None, 5))) + self.inputs.append(tf.keras.Input(shape=(None, None, 3))) self.flight_level = 0 @@ -362,18 +362,18 @@ class IcingIntensityFCN: nda = h5f[param][nd_idxs,] - nda[np.logical_and(nda >= 0, nda < 2000)] = 0 - nda[np.logical_and(nda >= 2000, nda < 4000)] = 1 - nda[np.logical_and(nda >= 4000, nda < 6000)] = 2 - nda[np.logical_and(nda >= 6000, nda < 8000)] = 3 - nda[np.logical_and(nda >= 8000, nda < 15000)] = 4 - # nda[np.logical_and(nda >= 0, nda < 2000)] = 0 - # nda[np.logical_and(nda >= 2000, nda < 8000)] = 1 - # nda[np.logical_and(nda >= 8000, nda < 15000)] = 2 + # nda[np.logical_and(nda >= 2000, nda < 4000)] = 1 + # nda[np.logical_and(nda >= 4000, nda < 6000)] = 2 + # nda[np.logical_and(nda >= 6000, nda < 8000)] = 3 + # nda[np.logical_and(nda >= 8000, nda < 15000)] = 4 - nda = tf.one_hot(nda, 5).numpy() - # nda = tf.one_hot(nda, 3).numpy() + nda[np.logical_and(nda >= 0, nda < 3000)] = 0 + nda[np.logical_and(nda >= 3000, nda < 6000)] = 1 + nda[np.logical_and(nda >= 6000, nda < 15000)] = 2 + + # nda = tf.one_hot(nda, 5).numpy() + nda = tf.one_hot(nda, 3).numpy() nda = np.expand_dims(nda, axis=1) nda = np.expand_dims(nda, axis=1)