Missed TensorFlow Dev Summit? Check out the video playlist. Watch recordings

tf.keras.backend.clip

TensorFlow 1 version View source on GitHub

Element-wise value clipping.

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

Arguments:

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

Returns:

A tensor.