# tensorflow::ops::Imag Class Reference

# tensorflow::
ops::
Imag

`
#include <math_ops.h>
`


Returns the imaginary part of a complex number.

## Summary


Given a tensor
`
input
`
of complex numbers, this operation returns a tensor of type
`
float
`
that is the imaginary part of each element in
`
input
`
.
[All](https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/all#classtensorflow_1_1ops_1_1_all)
elements in
`
input
`
must be complex numbers of the form \\(a + bj\\), where
* a *
is the real part and
* b *
is the imaginary part returned by this operation.


For example:


```
# tensor 'input' is [-2.25 + 4.75j, 3.25 + 5.75j]
tf.imag(input) ==> [4.75, 5.75]
```

<br />


Args:

- scope: A [Scope](https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object

<br />


Returns:

- `
  https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output
  ` : The output tensor.

<br />

| ### Constructors and Destructors ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/imag#classtensorflow_1_1ops_1_1_imag_1a406c38bf970910d1b58248e9feccd27a (const :: https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, :: https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input input) ` ||
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/imag#classtensorflow_1_1ops_1_1_imag_1a2bdbce17d9777d3c89abd2119f8b4fb5 (const :: https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, :: https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input input, const https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/imag/attrs#structtensorflow_1_1ops_1_1_imag_1_1_attrs & attrs) ` ||

| ### Public attributes ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/imag#classtensorflow_1_1ops_1_1_imag_1aa302f5369963935318220e2bb607871f ` | ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/imag#classtensorflow_1_1ops_1_1_imag_1af53e5f297c5f3549d3b850f55236e02f ` | ` :: https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output ` |

| ### Public functions ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/imag#classtensorflow_1_1ops_1_1_imag_1af1badb37efafaa8b189b8808921ff53f () const ` | ` ::tensorflow::Node * ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/imag#classtensorflow_1_1ops_1_1_imag_1a33696d39c41ab48057a23c8b98b762bf () const ` | ` ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/imag#classtensorflow_1_1ops_1_1_imag_1a833743732a3dfa7acfc167a529386580 () const ` | ` ` |

| ### Public static functions ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/imag#classtensorflow_1_1ops_1_1_imag_1a4de42f03c8df0d3972028cebd8bab495 (DataType x) ` | ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/imag/attrs#structtensorflow_1_1ops_1_1_imag_1_1_attrs ` |

| ### Structs ||
|---|---|
| [tensorflow:: ops:: Imag:: Attrs](https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/imag/attrs) | Optional attribute setters for [Imag](https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/imag#classtensorflow_1_1ops_1_1_imag) . |

## Public attributes

### operation

```
Operation operation
```

### output

```
::tensorflow::Output output
```

## Public functions

### Imag

```
 Imag(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input
)
```

### Imag

```
 Imag(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  const Imag::Attrs & attrs
)
```

### node

```
::tensorflow::Node * node() const 
```

### operator::tensorflow::Input

```
 operator::tensorflow::Input() const 
```

### operator::tensorflow::Output

```
 operator::tensorflow::Output() const 
```

## Public static functions

### Tout

```
Attrs Tout(
  DataType x
)
```