span class="n">no_grad</span><span class="p">():</span>
    <span class="n">new_outputs</span> <span class="o">=</span> <span class="n">optimized_model</span><span class="p">(</span><span class="o">*</span><span class="n">new_inputs</span><span class="p">)</span>
</pre></div>
</div>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># Does cause recompilation (new batch size)</span>
<span class="n">new_batch_size_inputs</span> <span class="o">=</span> <span c