'Set the indicated fields of x to val.
Args:
x: tensor.
indicator: boolean with same shape as x.
val: scalar with value to set.
Returns:
modified tensor.'

def _set_values_using_indicator(self, x, indicator, val):

    indicator = tf.cast(indicator, x.dtype)
    return tf.add(tf.multiply(x, (1 - indicator)), (val * indicator))
