Complex
tensorflow C++ API
Converts two real numbers to a complex number.
Summary
Given a tensorreal
representing the real part of a complex number, and a tensorimag
representing the imaginary part of a complex number, this operation returns complex numbers elementwise of the form (a + bj), where a represents thereal
part and b represents theimag
part.
The input tensorsreal
andimag
must have the same shape.
For example:
``` tensor 'real' is [2.25, 3.25]
tensorimag
is [4.75, 5.75]
tf.complex(real, imag) ==> [[2.25 + 4.75j], [3.25 + 5.75j]] ```
Arguments:
- scope: A Scope object
Returns:
Output
: The out tensor.
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.