tf.complex_abs()

tf.complex_abs(x, name=None)

Computes the complex absolute value of a tensor.

Given a tensor x of complex numbers, this operation returns a tensor of type float32 or float64 that is the absolute value of each element in x. All elements in x must be complex numbers of the form \(a + bj\). The absolute value is computed as \( \sqrt{a^2 + b^2}\).

For example:

# tensor 'x' is [[-2.25 + 4.75j], [-3.25 + 5.75j]]
tf.complex_abs(x) ==> [5.25594902, 6.60492229]
Args:
  • x: A Tensor of type complex64 or complex128.
  • name: A name for the operation (optional).
Returns:

A Tensor of type float32 or float64.

doc_TensorFlow
2016-10-14 12:42:51
Comments
Leave a Comment

Please login to continue.