Hello,
I am trying to get Tensor Flow to apply a vairable noise floor to some X & Y data.  Essentially this:

image260×696 5.28 KB

The problem I am having is that the Boolean Masking function does not return a tensor of the same shape that i fed it.  Moreover, I cannot assign a NULL, ZERO or some default value to the cells that are below the cut off.   Here is the code I have:
def NoiseFloor(x):
NFValue = tf.Variable(1.,dtype=tf.float64,constraint=lambda t: tf.clip_by_value(t, 10, 20))
y = tf.fill(tf.shape(x), NFValue)
y = tf.cast(y, np.float32)
return(tf.math.greater(x, y))
InputLayer = layers.Dense(5, activation=NoiseFloor, name=“Input_layer”)(TensorRFPower)
The issue is that this returns a T,F array that is of a different overall shape.