diff --git a/models/Model_SAEHD/Model.py b/models/Model_SAEHD/Model.py index 95445ac..f8dfbe9 100644 --- a/models/Model_SAEHD/Model.py +++ b/models/Model_SAEHD/Model.py @@ -508,7 +508,8 @@ Examples: df, liae, df-d, df-ud, liae-ud, ... probs = tf.math.log([[noise, 1-noise]]) if label == 1 else tf.math.log([[1-noise, noise]]) x = tf.random.categorical(probs, num_labels) x = tf.cast(x, tf.float32) - x = x * (1-smoothing) + (smoothing/x.shape[1]) + x = x * (1-smoothing) + (smoothing/num_labels) + # x = tf.math.scalar_mul(1-smoothing, x) + (smoothing/x.shape[1]) x = tf.reshape(x, (self.batch_size,) + tensor.shape[1:]) return x