Missed TensorFlow World? Check out the recap. Learn more

tf.keras.backend.clip

TensorFlow 1 version View source on GitHub

Element-wise value clipping.

Aliases:

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

Arguments:

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

Returns:

A tensor.