So I have been trying to solve this issue with no luck so far.  I switched to trying to gain access to the elements in the tensor, so I could use an IF statement to make the element assignments.  I tried a couple different functions:

tf.tensor_scatter_nd_add(
tf.assign_sub(
tf.assign(

Accessing the elements in the tensor itself (in v2) seems to be limited.  Like I said I can:

Get a Bool Array of values above and below the cutoff
Apply a Bool Mask to that array and then get the values.  But this array is not the same shape.

I also looked at recursive code to step through the elements in this array
def my_elementwise_func(tensorelement):
return tensorelement + 1
def NoiseFloor(x):
print(x)
if tf.shape(x).ndims > 0:
return tf.map_fn(NoiseFloor, x)
else:
return my_elementwise_func(x)
result = NoiseFloor(x)
print(result)

I just do not think their isn’t an existing function that works with Tensorflow that does not already do this.  I am going to look at SciPy if nobody gets back to me.