# Torch to ONNX conversion going wrong

**URL:** <https://discuss.pytorch.org/t/torch-to-onnx-conversion-going-wrong/121596>\
**Category:** deployment\
**Created:** [May 18, 2021, 6:50am UTC](https://discuss.pytorch.org/t/torch-to-onnx-conversion-going-wrong/121596 "2021-05-18T06:50:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darshan](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/darshan/32/38432_2.png) [@Darshan](https://discuss.pytorch.org/u/Darshan)\
**Post date:** [May 18, 2021, 6:50am UTC](https://discuss.pytorch.org/t/torch-to-onnx-conversion-going-wrong/121596/1 "2021-05-18T06:50:02Z")

</div>

Hi Pytorch Team,

I am converting one PyTorch Model(yoloact) trained on my custom dataset to ONNX, the conversion is completing successfully, but in the ONNX model one of the node is not getting connected to the graph.  
I have attached the picture of the graph below.

Having said that, the pytorch model Inference is working fine, but not sure why one of the node is not getting connected to the graph in the onnx model.

Can you please assist me to solve this error? Would be a great help from yourside.

I am attaching the screenshot of the graph below:

 ![Screenshot from 2021-05-18 12-17-13](https://discuss.pytorch.org/uploads/default/original/3X/0/2/02ff6c3bebd5e3de7873f87bea571edd6272d7fd.png)

Thanks,  
Darshan

---

<div class="post-metadata">

**Author:** ![Darshan](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/darshan/32/38432_2.png) [@Darshan](https://discuss.pytorch.org/u/Darshan)\
**Post date:** [May 18, 2021, 11:28am UTC](https://discuss.pytorch.org/t/torch-to-onnx-conversion-going-wrong/121596/2 "2021-05-18T11:28:31Z")

</div>

Looking forward to the Reply.

Regards,  
Darshan

---

<div class="post-metadata">

**Author:** ![novice96](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/novice96/32/39357_2.png) [@novice96](https://discuss.pytorch.org/u/novice96)\
**Post date:** [June 16, 2021, 9:02am UTC](https://discuss.pytorch.org/t/torch-to-onnx-conversion-going-wrong/121596/3 "2021-06-16T09:02:11Z")

</div>

hey how do you convert Pytorch to Onnx , I’ve tried but no lucks.

---

<div class="post-metadata">

**Author:** ![marksaroufim](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/marksaroufim/32/36747_2.png) [@marksaroufim](https://discuss.pytorch.org/u/marksaroufim)\
**Post date:** [February 22, 2022, 11:23pm UTC](https://discuss.pytorch.org/t/torch-to-onnx-conversion-going-wrong/121596/4 "2022-02-22T23:23:39Z")

</div>

Hi Darshan could you share your code? It might be possible that you have an unsused constant
