'len' is not supported in symbolic tracing by default

yang_wang: <p>Hello, I now have a requirement to parse the yolov3 network constructed by mmdetion. In mmdetion, the yolov3 network is divided into backbone, neck, bbox, and 3 parts. But when I use torch.fx to parse this model, I have the following problem. I tried to use the torch.fx.wrap(‘len’) tutorial given by the official website to solve this problem. It is very strange that the example on the official website runs successfully, but it does not take effect in the code I wrote. How to solve the problem that ‘len’ cannot be resolved?</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/8/1/81d9afab0879c30c90a93c8a42f1b1292d4b1a93.png" data-download-href="https://discuss.pytorch.org/uploads/default/81d9afab0879c30c90a93c8a42f1b1292d4b1a93" title="1"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/8/1/81d9afab0879c30c90a93c8a42f1b1292d4b1a93_2_690x436.png" alt="1" data-base62-sha1="iwHZ1n5f2iyQv9ZoM4zkHsA764X" width="690" height="436" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/8/1/81d9afab0879c30c90a93c8a42f1b1292d4b1a93_2_690x436.png, https://discuss.pytorch.org/uploads/default/optimized/3X/8/1/81d9afab0879c30c90a93c8a42f1b1292d4b1a93_2_1035x654.png 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/8/1/81d9afab0879c30c90a93c8a42f1b1292d4b1a93.png 2x" data-dominant-color="472020"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">1</span><span class="informations">1317×834 119 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

yang_wang: <p>The following is the content of the code<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/f/a/fae90964265ce399f87b5a0dd64bc37ca09bbcd1.png" data-download-href="https://discuss.pytorch.org/uploads/default/fae90964265ce399f87b5a0dd64bc37ca09bbcd1" title="2"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/f/a/fae90964265ce399f87b5a0dd64bc37ca09bbcd1_2_690x337.png" alt="2" data-base62-sha1="zNEE4MDRUzYzeKnhlb9LKTLVi9j" width="690" height="337" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/f/a/fae90964265ce399f87b5a0dd64bc37ca09bbcd1_2_690x337.png, https://discuss.pytorch.org/uploads/default/optimized/3X/f/a/fae90964265ce399f87b5a0dd64bc37ca09bbcd1_2_1035x505.png 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/f/a/fae90964265ce399f87b5a0dd64bc37ca09bbcd1.png 2x" data-dominant-color="252726"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">2</span><span class="informations">1107×542 57.2 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

jerryzh168: <p>looks like it’s related to fx instead of quantization, can you post in <a href="https://discuss.pytorch.org/c/fx-functional-transformations/31" class="inline-onebox">FX (Functional Transformations) - PyTorch Forums</a> instead?</p>

yang_wang: <pre><code class="lang-auto">type or paste code here
</code></pre>
<p>ok，thank you <img src="https://discuss.pytorch.org/images/emoji/apple/hugs.png?v=12" title=":hugs:" class="emoji" alt=":hugs:" loading="lazy" width="20" height="20"></p>