# \[ONNX\] Tried to trace \<submodule\> but it is not part of the active trace

**URL:** <https://discuss.pytorch.org/t/onnx-tried-to-trace-submodule-but-it-is-not-part-of-the-active-trace/80320>\
**Category:** jit\
**Created:** [May 8, 2020, 11:38am UTC](https://discuss.pytorch.org/t/onnx-tried-to-trace-submodule-but-it-is-not-part-of-the-active-trace/80320 "2020-05-08T11:38:12Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![wanchaol](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/wanchaol/32/50343_2.png) [@wanchaol](https://discuss.pytorch.org/u/wanchaol)\
**Post date:** [May 8, 2020, 6:02pm UTC](https://discuss.pytorch.org/t/onnx-tried-to-trace-submodule-but-it-is-not-part-of-the-active-trace/80320/3 "2020-05-08T18:02:42Z")

</div>

I think the step 2 here is probably wrong, you should not trace a quantized model before swapping it in? You can swap a quantized backbone model in first, then do onnx export, there’s no need to do explicit tracing as ONNX export will do it underlying.

---

_[View the full topic](https://discuss.pytorch.org/t/onnx-tried-to-trace-submodule-but-it-is-not-part-of-the-active-trace/80320)._
