span class="n">img</span><span class="p">)</span>
    <span class="n">input_batch</span> <span class="o">=</span> <span class="n">input_tensor</span><span class="o">.</span><span class="n">unsqueeze</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span> <span class="c1"># create a mini-batch as expected by the model</span>

    <span class="c1"># move the input and model to GPU for speed if available</span>
    <span class="k">if</span> <span class="n">torch</span><span class="o">.<