Size
tensorflow C++ API
Returns the size of a tensor.
Summary
This operation returns an integer representing the number of elements ininput
.
For example:
``` ‘t’ is [[[1, 1,, 1], [2, 2, 2]], [[3, 3, 3], [4, 4, 4]]]]
size(t) ==> 12 ```
Arguments:
- scope: A Scope object
Returns:
Output
: The output tensor.
Size 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 input: Any tensor.
- Size::Attrs attrs
- out_type: The type of output tensor.
Output:
- Output output: Output object of Size class object.
Result:
- std::vector(Tensor)
result_output
: The number of values in input.
Using Method
※ input으로 들어온 tensor의 value의 갯수를 알려준다.