Sum


tensorflow C++ API

tensorflow::ops::Sum

Computes the sum of elements across dimensions of a tensor.


Summary

Reducesinputalong the dimensions given inaxis. Unlesskeep_dimsis true, the rank of the tensor is reduced by 1 for each entry inaxis. Ifkeep_dimsis true, the reduced dimensions are retained with length 1.

Arguments:

  • scope: A Scope object
  • input: The tensor to reduce.
  • axis: The dimensions to reduce.Row :axis 1,Col axis : 0

Returns:

Constructor

  • Sum(const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input axis, const Sum::Attrs & attrs).

Public attributes

  • tensorflow::Output output.

Sum 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.
  • Input axis:connect Input node.
  • Sum::Attrs attrs : Input attrs value. ex) keep_dims_ = false;

Return:

  • Output output: Output object of Sum class object.

Result:

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

Using Method

results matching ""

    No results matching ""