tf.keras.backend.clip

tf.keras.backend.clip(
    x,
    min_value,
    max_value
)

Defined in tensorflow/python/keras/backend.py.

Element-wise value clipping.

Arguments:

  • x: Tensor or variable.
  • min_value: Python float or integer.
  • max_value: Python float or integer.

Returns:

A tensor.