downlit sourceCode r">
<code class="sourceCode R"><span class="va">stop_if_negative2</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/pkg/tensorflow/man/tf_function.html">tf_function</a></span><span class="op">(</span><span class="va">stop_if_negative</span><span class="op">)</span>
<span class="va">sess</span><span class="op">$</span><span class="fu">run</span><span class="op">(</span><span class="fu">stop_if_negative2</span><span class="op">(</span><span class="va">x</span><s