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


TensorFlow 1 version View source on GitHub

Performs a safe saturating cast of value to dtype.

    value, dtype, name=None

This function casts the input to dtype without applying any scaling. If there is a danger that values would over or underflow in the cast, this op applies the appropriate clamping before the cast.


  • value: A Tensor.
  • dtype: The desired output DType.
  • name: A name for the operation (optional).


value safely cast to dtype.