Switch
tensorflow C++ API
Forwards data
to the output port determined by pred
.
Summary
Ifpred
is true, thedata
input is forwarded tooutput_true
. Otherwise, the data goes tooutput_false
.
Arguments:
- scope: A Scope object
- data: The tensor to be forwarded to the appropriate output.
- pred: A scalar that specifies which output port will receive data.
Returns:
Output
output_false: Ifpred
is false, data will be forwarded to this output.Output
output_true: Ifpred
is true, data will be forwarded to this output.
Switch 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.)
- Input data: The tensor to be forwarded to the appropriate output.
- Input pred: A scalar that specifies which output port will receive data.
Returns:
Output
output_false: Ifpred
is false, data will be forwarded to this output.Output
output_true: Ifpred
is true, data will be forwarded to this output.
Using Method
※ merge와 조합하여 output_false나 output_true값 중 하나로 나갈 수 있기 때문에 위 화면처럼 분기점 용도로 사용할 수 있다.