/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1384, in _do_call</span>
<span class="co">#&gt;     raise type(e)(node_def, op, message)</span></code></pre></div>
<p>The other is to capture the assert operation as a control dependency of the evaluated tensor.</p>
<div class="sourceCode" id="cb4"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">stop_if_negative3</span> <span class="op">&lt;-</span> <span class="kw">function</span><span class="op">(</span