def clip(x, min_value, max_value):
    if max_value < min_value:
        max_value = min_value
    return tf.clip_by_value(x, tf.cast(min_value, dtype=_FLOATX),
                            tf.cast(max_value, dtype=_FLOATX))
Element-wise value clipping.
dataset/ETHPy150Open fchollet/keras/keras/backend/tensorflow_backend.py/clip