TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tf.keras.backend.clip

TensorFlow 1 version View source on GitHub

Element-wise value clipping.

Aliases:

  • tf.compat.v1.keras.backend.clip
  • tf.compat.v2.keras.backend.clip
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.