<p>Merge/Switch are concepts taken from data flow processing concepts from the 70s
<a href="https://i.stack.imgur.com/qa5kn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qa5kn.png" alt="enter image description here"></a></p>

<p>(from Advances in Computers, 1992)</p>

<p>See section 4.4 of <a href="https://arxiv.org/pdf/1603.04467.pdf" rel="nofollow noreferrer">https://arxiv.org/pdf/1603.04467.pdf</a> , discussion in <a href="https://github.com/tensorflow/tensorflow/issues/4762" rel="nofollow noreferrer">https://github.com/tensorflow/tensorflow/issues/4762</a></p>

<p>Also following code may be informative:</p>

<p>A replacement for Switch:
<a href="https://github.com/tensorflow/tensorflow/pull/9189" rel="nofollow noreferrer">https://github.com/tensorflow/tensorflow/pull/9189</a></p>

<p>Adding gradients to while loop:
<a href="https://github.com/tensorflow/tensorflow/commit/301b14c2" rel="nofollow noreferrer">https://github.com/tensorflow/tensorflow/commit/301b14c2</a></p>
In tensorflow source code, what is node class (merge, enter, exit ...)?
<p>I'm looking for code of tensorflow v1.3 for using this framework more precise. </p>

<p>However there are lots of complicate things.</p>

<p>Specifically, I'm watching the process of running the graph. </p>

<p>When one node's numerical computation is done, the output of that node will be added to ready queue. </p>

<p>With this thought, I tracked the code of tensorflow. However in PropagateOutputs function (tensorflow/core/common_runtime/executor.cc), they divide the case into four (enter, exit, next iteration, none). </p>

<p>In this part, I have no idea what node is enter, exit or something. Also I cannot get the point of frame and iteration after I read the manual in the tf code. </p>

<p>Can I get some knowledge of such things or can I get any reference for studying the architecture of tensorflow?</p>

<p>Thanks.</p>