I\'m working on a convolutional neural network in tensorflow and I have a problem. The problem is the input image I read through tfrecords contains a certain number of nan v
Clip by value made NaN infinity and where was overkill for one variable. I used this to convert a single value to 0 if it's NaN:
value_not_nan = tf.dtypes.cast(tf.math.logical_not(tf.math.is_nan(value)), dtype=tf.float32) tf.math.multiply_no_nan(value, value_not_nan)