Shape
tensorflow C++ API
Returns the shape of a tensor.
Summary
This operation returns a 1-D integer tensor representing the shape ofinput
.
For example:
``` 't' is [[[1, 1, 1], [2, 2, 2]], [[3, 3, 3], [4, 4, 4]]]
shape(t) ==> [2, 2, 3] ```
Arguments:
- scope: A Scope object
Returns:
Output
: The output tensor.
Shape 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.
- Shape::Attrs attrs
- out_type: The type of output tensor.
Output:
- Output output: Output object of Shape class object.
Result:
- std::vector(Tensor)
result_output
: The output tensor.
Using Method
※ input으로 들어온 tensor의 shape를 뽑아낸다.