Switch


tensorflow C++ API

tensorflow::ops::Switch

Forwards datato the output port determined by pred.


Summary

Ifpredis true, thedatainput is forwarded tooutput_true. Otherwise, the data goes tooutput_false.

See alsoRefSwitchandMerge.

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:

  • Outputoutput_false: Ifpredis false, data will be forwarded to this output.
  • Outputoutput_true: Ifpredis 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:

  • Outputoutput_false: If predis false, data will be forwarded to this output.
  • Outputoutput_true: If predis true, data will be forwarded to this output.

Using Method

※ merge와 조합하여 output_false나 output_true값 중 하나로 나갈 수 있기 때문에 위 화면처럼 분기점 용도로 사용할 수 있다.

results matching ""

    No results matching ""