Placeholder


tensorflow C++ API

tensorflow::ops::Placeholder

A placeholder op for a value that will be fed into the computation.


Summary

N.B. This operation will fail with an error if it is executed. It is intended as a way to represent a value that will always be fed, and to provide attrs that enable the fed value to be checked at runtime.

Arguments:

  • scope: A Scope object
  • dtype: The type of elements in the tensor.

Optional attributes (seeAttrs):

  • shape: (Optional) The shape of the tensor. If the shape has 0 dimensions, the shape is unconstrained.

Returns:

  • Output: A placeholder tensor that must be replaced using the feed mechanism.

Placeholder block

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

Argument:

  • Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.)
  • Input dtype: The type of elements in the tensor.
  • Placeholder::Attrs attrs
    • shape_: (Optional) The shape of the tensor. If the shape has 0 dimensions, the shape is unconstrained.

Output:

  • Output y: Output object of Placeholder class object.

Result:

  • std::vector(Tensor) result_output: A placeholder tensor that must be replaced using the feed mechanism.

Using Method

※input_initializer에서 tensor를 직접 생성하여 placeholder를 사용하는 경우

※tensor 블록을 이용하여 placeholder를 사용하는 경우

results matching ""

    No results matching ""