Link Search Menu Expand Document

Merge


tensorflow C++ API

tensorflow::ops::Merge

Forwards the value of an available tensor from inputs to output.


Summary

Mergewaits for at least one of the tensors ininputsto become available. It is usually combined withSwitchto implement branching.

Mergeforwards the first tensor to become available tooutput, and setsvalue_indexto 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 in inputs.

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 in inputs.

Using Method

※ inputs으로 들어온 inputlist에서 사용 할 수 있는 tensor를 output으로 내보내는 역할을 한다. 위 화면에서 switch값이 11이 되면 value_index가 0(리스트에서 첫번째로 들어오는 값이 나오게된다. switch의 output_false값)이 된다.