Complex


tensorflow C++ API

tensorflow::ops::Complex

Converts two real numbers to a complex number.


Summary

Given a tensorrealrepresenting the real part of a complex number, and a tensorimagrepresenting the imaginary part of a complex number, this operation returns complex numbers elementwise of the form (a + bj), where a represents therealpart and b represents theimagpart.

The input tensorsrealandimagmust have the same shape.

For example:

``` tensor 'real' is [2.25, 3.25]

tensorimagis [4.75, 5.75]

tf.complex(real, imag) ==> [[2.25 + 4.75j], [3.25 + 5.75j]] ```

Arguments:

Returns:

Constructor

  • Complex(const ::tensorflow::Scope & scope, ::tensorflow::Input real, ::tensorflow::Input imag, const Complex::Attrs attrs).

Public attributes

  • tensorflow::Output out.

Complex block

Source link : https://github.com/EXPNUNI/enuSpaceTensorflow/blob/master/enuSpaceTensorflow/tf_math.cpp

Argument:

  • Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.).
  • Input x:connect Input node.
  • Input y:connect Input node.
  • Complex::Attrs attrs:Input DatType in value. ex) Tout_=DT_COMPLEX64, Tout_=DT_COMPLEX128

Return:

  • Output out : Output object of Complex class object.

Result:

  • std::vector(Tensor) product_result : Returned object of executed result by calling session.

Using Method

results matching ""

    No results matching ""