Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::ComplexAbs
#include <math_ops.h>
Computes the complex absolute value of a tensor.
Summary
Given a tensor x
of complex numbers, this operation returns a tensor of type float
or double
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:
x = tf.complex(3.0, 4.0) print((tf.raw_ops.ComplexAbs(x=x, Tout=tf.dtypes.float32, name=None)).numpy()) 5.0
Args:
Returns:
Public static functions
|
Tout(DataType x)
|
|
Public attributes
Public functions
node
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Public static functions
Tout
Attrs Tout(
DataType x
)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[],[],null,["# tensorflow::ops::ComplexAbs Class Reference\n\ntensorflow::ops::ComplexAbs\n===========================\n\n`#include \u003cmath_ops.h\u003e`\n\nComputes the complex absolute value of a tensor.\n\nSummary\n-------\n\nGiven a tensor `x` of complex numbers, this operation returns a tensor of type `float` or `double` that is the absolute value of each element in `x`. [All](/versions/r2.14/api_docs/cc/class/tensorflow/ops/all#classtensorflow_1_1ops_1_1_all) elements in `x` must be complex numbers of the form \\\\(a + bj\\\\). The absolute value is computed as \\\\( \\\\sqrt{a\\^2 + b\\^2}\\\\).\n\nFor example:\n\nx = tf.complex(3.0, 4.0) print((tf.raw_ops.ComplexAbs(x=x, Tout=tf.dtypes.float32, name=None)).numpy()) 5.0\n\nArgs:\n\n- scope: A [Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.14/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The y tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [ComplexAbs](#classtensorflow_1_1ops_1_1_complex_abs_1ae9a8ff8e40f2b268efeb2cbf52eb00c9)`(const ::`[tensorflow::Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.14/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` x)` ||\n| [ComplexAbs](#classtensorflow_1_1ops_1_1_complex_abs_1ae1f3cbfd4330b1a2b1bd0bb7d20aaa7e)`(const ::`[tensorflow::Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.14/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` x, const `[ComplexAbs::Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/complex-abs/attrs#structtensorflow_1_1ops_1_1_complex_abs_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_complex_abs_1a6339381a61011992fd1de7df2195c9dc) | [Operation](/versions/r2.14/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [y](#classtensorflow_1_1ops_1_1_complex_abs_1a4aac4710658d4d29694592675b9ed213) | `::`[tensorflow::Output](/versions/r2.14/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|-----------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_complex_abs_1aeaf0e98583b3d60a726ebf29e7541d17)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_complex_abs_1a5590861b4175946a8e4ebff58d9e8f29)`() const ` | |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_complex_abs_1a81aea0f48f1416e116c66bb7111b1272)`() const ` | |\n\n| ### Public static functions ||\n|--------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|\n| [Tout](#classtensorflow_1_1ops_1_1_complex_abs_1af17c93749b98b61e134f43532f100da1)`(DataType x)` | [Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/complex-abs/attrs#structtensorflow_1_1ops_1_1_complex_abs_1_1_attrs) |\n\n| ### Structs ||\n|-----------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::ComplexAbs::Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/complex-abs/attrs) | Optional attribute setters for [ComplexAbs](/versions/r2.14/api_docs/cc/class/tensorflow/ops/complex-abs#classtensorflow_1_1ops_1_1_complex_abs). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### y\n\n```text\n::tensorflow::Output y\n``` \n\nPublic functions\n----------------\n\n### ComplexAbs\n\n```gdscript\n ComplexAbs(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input x\n)\n``` \n\n### ComplexAbs\n\n```gdscript\n ComplexAbs(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input x,\n const ComplexAbs::Attrs & attrs\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n``` \n\nPublic static functions\n-----------------------\n\n### Tout\n\n```text\nAttrs Tout(\n DataType x\n)\n```"]]