Link Search Menu Expand Document

Real


tensorflow C++ API

tensorflow::ops::Real

Returns the real part of a complex number.


Summary

Given a tensorinputof complex numbers, this operation returns a tensor of typefloatthat is the real part of each element ininput.All elements ininputmust be complex numbers of the form a + bj, where a is the real part returned by this operation and b is the imaginary part.

For example:

``` tensor ‘input’ is [-2.25 + 4.75j, 3.25 + 5.75j]

tf.real(input) ==> [-2.25, 3.25] ```

Arguments:

Returns:

Constructor

  • Real(const ::tensorflow::Scope & scope, ::tensorflow::Input input, const Real::Attrs & attrs)

Public attributes

  • tensorflow::Output output.

Real 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 input:connect Input node.
  • Real::Attrs & attrs : Input DataType. ex)Tout_ = DT_FLOAT;

Return:

  • Output output : Output object of Real class object.

Result:

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

Using Method