'len' is not supported in symbolic tracing by default

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?

The following is the content of the code

looks like it’s related to fx instead of quantization, can you post in FX (Functional Transformations) - PyTorch Forums instead?

type or paste code here

ok,thank you :hugs:

1 Like