# Problem when I import my onnx model

**URL:** <https://forum.opencv.org/t/problem-when-i-import-my-onnx-model/6403>\
**Category:** Python\
**Tags:** dnn, onnx\
**Created:** [November 24, 2021, 11:28am UTC](https://forum.opencv.org/t/problem-when-i-import-my-onnx-model/6403 "2021-11-24T11:28:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xamapl99](https://avatars.discourse-cdn.com/v4/letter/x/4da419/32.png) [@xamapl99](https://forum.opencv.org/u/xamapl99)\
**Post date:** [November 24, 2021, 11:28am UTC](https://forum.opencv.org/t/problem-when-i-import-my-onnx-model/6403/1 "2021-11-24T11:28:05Z")

</div>

Hi, I’m trying to import my onnx model that I exported with Pytorch, and with dnn.readNetFromONNX I get an error. Wheras if i import the model with an onnx session it’s all correct.

The error that I get is this:

[ERROR:0] global /tmp/pip-req-build-afu9cjzs/opencv/modules/dnn/src/onnx/onnx\_importer.cpp (2125) handleNode DNN/ONNX: ERROR during processing node with 2 inputs and 1 outputs: [Unsqueeze]:(30)

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [July 4, 2023, 3:02pm UTC](https://forum.opencv.org/t/problem-when-i-import-my-onnx-model/6403/2 "2023-07-04T15:02:00Z")

</div>

3 posts were split to a new topic: [Error importing onnx model using opencv c++](https://forum.opencv.org/t/error-importing-onnx-model-using-opencv-c/13752)
