Merge
tensorflow C++ API
Forwards the value of an available tensor from inputs
to output
.
Summary
Merge
waits for at least one of the tensors ininputs
to become available. It is usually combined withSwitch
to implement branching.
Merge
forwards the first tensor to become available tooutput
, and setsvalue_index
to its index ininputs
.
Arguments:
- scope: A Scope object
- inputs: The input tensors, exactly one of which will become available.
Returns:
Output
output: Will be set to the available input tensor.Output
value_index: The index of the chosen input tensor ininputs
.
Merge block
Source link :https://github.com/EXPNUNI/enuSpaceTensorflow/blob/master/enuSpaceTensorflow/tf_control_flow_ops.cpp
Argument:
- Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.)
- InputList
inputs
: The input tensors, exactly one of which will become available.
Return:
Output
output: Will be set to the available input tensor.Output
value_index: The index of the chosen input tensor ininputs
.
Using Method
※ inputs으로 들어온 inputlist에서 사용 할 수 있는 tensor를 output으로 내보내는 역할을 한다. 위 화면에서 switch값이 11이 되면 value_index가 0(리스트에서 첫번째로 들어오는 값이 나오게된다. switch의 output_false값)이 된다.