RefSwitch
tensorflow C++ API
Forwards the ref tensor 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 ref 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.
RefSwitch 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 ref 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
※ switch의 ref버전 이다. data에 레퍼런스 타입의 tensor를 입력한다는 점만 다르고 나머지 사용법은 동일하다.