diff --git a/modules/deeplearning/icing_cnn.py b/modules/deeplearning/icing_cnn.py index 9f53379d9043304648fb16d57ce570c6307bd7b9..df3b92a338e905e70f515d319f4547ec3903fadf 100644 --- a/modules/deeplearning/icing_cnn.py +++ b/modules/deeplearning/icing_cnn.py @@ -535,7 +535,12 @@ class IcingIntensityNN: num_filters = len(train_params) * 2 - conv = tf.keras.layers.Conv2D(num_filters, 5, strides=[1, 1], padding=padding, activation=activation)(self.inputs[0]) + if NOISE_TRAINING: + input_2d = tf.keras.layers.GaussianNoise(stddev=NOISE_STDDEV)(self.inputs[0]) + else: + input_2d = self.inputs[0] + + conv = tf.keras.layers.Conv2D(num_filters, 5, strides=[1, 1], padding=padding, activation=activation)(input_2d) conv = tf.keras.layers.MaxPool2D(padding=padding)(conv) conv = tf.keras.layers.BatchNormalization()(conv) print(conv.shape)