Skip to content
Snippets Groups Projects
Commit 9b3db849 authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 5e5a754a
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,7 @@ if NumClasses == 2: ...@@ -19,6 +19,7 @@ if NumClasses == 2:
NumLogits = 1 NumLogits = 1
else: else:
NumLogits = NumClasses NumLogits = NumClasses
NumFlightLevels = 3
BATCH_SIZE = 128 BATCH_SIZE = 128
NUM_EPOCHS = 60 NUM_EPOCHS = 60
...@@ -241,8 +242,7 @@ class IcingIntensityFCN: ...@@ -241,8 +242,7 @@ class IcingIntensityFCN:
self.X_img = tf.keras.Input(shape=(None, None, n_chans)) self.X_img = tf.keras.Input(shape=(None, None, n_chans))
self.inputs.append(self.X_img) 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, NumFlightLevels)))
self.inputs.append(tf.keras.Input(shape=(None, None, 3)))
self.flight_level = 0 self.flight_level = 0
...@@ -362,18 +362,18 @@ class IcingIntensityFCN: ...@@ -362,18 +362,18 @@ class IcingIntensityFCN:
nda = h5f[param][nd_idxs,] nda = h5f[param][nd_idxs,]
# nda[np.logical_and(nda >= 0, nda < 2000)] = 0 if NumFlightLevels == 5:
# nda[np.logical_and(nda >= 2000, nda < 4000)] = 1 nda[np.logical_and(nda >= 0, nda < 2000)] = 0
# nda[np.logical_and(nda >= 4000, nda < 6000)] = 2 nda[np.logical_and(nda >= 2000, nda < 4000)] = 1
# nda[np.logical_and(nda >= 6000, nda < 8000)] = 3 nda[np.logical_and(nda >= 4000, nda < 6000)] = 2
# nda[np.logical_and(nda >= 8000, nda < 15000)] = 4 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 < 3000)] = 0 elif NumFlightLevels == 3:
nda[np.logical_and(nda >= 3000, nda < 6000)] = 1 nda[np.logical_and(nda >= 0, nda < 3000)] = 0
nda[np.logical_and(nda >= 6000, nda < 15000)] = 2 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 = tf.one_hot(nda, NumFlightLevels).numpy()
nda = np.expand_dims(nda, axis=1) nda = np.expand_dims(nda, axis=1)
nda = np.expand_dims(nda, axis=1) nda = np.expand_dims(nda, axis=1)
......
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