maybe_clip_value

tfsnippet.ops.maybe_clip_value(x, min_val=None, max_val=None, name=None)

Maybe clip the elements of x.

Parameters:
  • x – The tensor maybe to be clipped.
  • min_val – The minimum value.
  • max_val – The maximum value.
  • name (str) – Default name of the name scope. If not specified, generate one according to the method name.
Returns:

The clipped tensor.

Return type:

tf.Tensor