scratch_space</span><span class="w"></span>
</pre></div>
</div>
<p>Once inside the container, we can proceed to download a ResNet model from
Torchhub and optimize it with Torch-TensorRT.</p>
<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span>import torch
import torch_tensorrt
torch.hub._validate_not_a_forked_repo=lambda a,b,c: True

# load model
model = torch.hub.load(&#39;pytorch/vision:v0.10.0&#39;, &#39;resnet50&#39;, pretrained=True).eval().to(&quot;cuda&quot;)

# Compile wi