<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Cannot infer shape for node Unsqueeze in Intel® Distribution of OpenVINO™ Toolkit</title>
    <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Cannot-infer-shape-for-node-Unsqueeze/m-p/1395417#M27653</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am trying to convert an onnx model generated from Paddle inference to IR.&lt;/P&gt;
&lt;P&gt;Openvino version: 2021&lt;/P&gt;
&lt;P&gt;Command: python mo.py --input_model "SVTR_Tiny.onnx"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Error:&lt;/P&gt;
&lt;P&gt;[ ERROR ] The ExpandDims node p2o.Unsqueeze.0 has more than 1 input&lt;BR /&gt;[ ERROR ] The ExpandDims node p2o.Unsqueeze.1 has more than 1 input&lt;BR /&gt;[ ERROR ] The ExpandDims node p2o.Unsqueeze.2 has more than 1 input&lt;BR /&gt;[ ERROR ] The ExpandDims node p2o.Unsqueeze.3 has more than 1 input&lt;BR /&gt;[ ERROR ] The ExpandDims node p2o.Unsqueeze.4 has more than 1 input&lt;BR /&gt;[ ERROR ] Cannot infer shapes or values for node "p2o.Unsqueeze.4".&lt;BR /&gt;[ ERROR ] Wrong number of inputs to the layer p2o.Unsqueeze.4&lt;BR /&gt;[ ERROR ]&lt;BR /&gt;[ ERROR ] It can happen due to bug in custom shape infer function &amp;lt;function ExpandDims.infer at 0x0000016E198483A8&amp;gt;.&lt;BR /&gt;[ ERROR ] Or because the node inputs have incorrect values/shapes.&lt;BR /&gt;[ ERROR ] Or because input shapes are incorrect (embedded to the model or passed via --input_shape).&lt;BR /&gt;[ ERROR ] Run Model Optimizer with --log_level=DEBUG for more information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The model is a transformer-based text recognition model, This model primarily uses Grid_Sampler, which I have replaced with a custom function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Link for the original model:&amp;nbsp;&lt;A href="https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.5/doc/doc_en/algorithm_rec_svtr_en.md#4-3" target="_blank"&gt;PaddleOCR/algorithm_rec_svtr_en.md at release/2.5 · PaddlePaddle/PaddleOCR (github.com)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Converted PaddleIR and ONNX(using Paddle2onnx):&amp;nbsp;&lt;A href="https://drive.google.com/drive/folders/1lnpgDhDp8FqmBfb9UoKssWZavkF0tfJ3?usp=sharing" target="_blank"&gt;https://drive.google.com/drive/folders/1lnpgDhDp8FqmBfb9UoKssWZavkF0tfJ3?usp=sharing&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Can you please provide a solution for this issue.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 26 Jun 2022 08:29:02 GMT</pubDate>
    <dc:creator>Simardeep</dc:creator>
    <dc:date>2022-06-26T08:29:02Z</dc:date>
    <item>
      <title>Cannot infer shape for node Unsqueeze</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Cannot-infer-shape-for-node-Unsqueeze/m-p/1395417#M27653</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am trying to convert an onnx model generated from Paddle inference to IR.&lt;/P&gt;
&lt;P&gt;Openvino version: 2021&lt;/P&gt;
&lt;P&gt;Command: python mo.py --input_model "SVTR_Tiny.onnx"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Error:&lt;/P&gt;
&lt;P&gt;[ ERROR ] The ExpandDims node p2o.Unsqueeze.0 has more than 1 input&lt;BR /&gt;[ ERROR ] The ExpandDims node p2o.Unsqueeze.1 has more than 1 input&lt;BR /&gt;[ ERROR ] The ExpandDims node p2o.Unsqueeze.2 has more than 1 input&lt;BR /&gt;[ ERROR ] The ExpandDims node p2o.Unsqueeze.3 has more than 1 input&lt;BR /&gt;[ ERROR ] The ExpandDims node p2o.Unsqueeze.4 has more than 1 input&lt;BR /&gt;[ ERROR ] Cannot infer shapes or values for node "p2o.Unsqueeze.4".&lt;BR /&gt;[ ERROR ] Wrong number of inputs to the layer p2o.Unsqueeze.4&lt;BR /&gt;[ ERROR ]&lt;BR /&gt;[ ERROR ] It can happen due to bug in custom shape infer function &amp;lt;function ExpandDims.infer at 0x0000016E198483A8&amp;gt;.&lt;BR /&gt;[ ERROR ] Or because the node inputs have incorrect values/shapes.&lt;BR /&gt;[ ERROR ] Or because input shapes are incorrect (embedded to the model or passed via --input_shape).&lt;BR /&gt;[ ERROR ] Run Model Optimizer with --log_level=DEBUG for more information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The model is a transformer-based text recognition model, This model primarily uses Grid_Sampler, which I have replaced with a custom function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Link for the original model:&amp;nbsp;&lt;A href="https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.5/doc/doc_en/algorithm_rec_svtr_en.md#4-3" target="_blank"&gt;PaddleOCR/algorithm_rec_svtr_en.md at release/2.5 · PaddlePaddle/PaddleOCR (github.com)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Converted PaddleIR and ONNX(using Paddle2onnx):&amp;nbsp;&lt;A href="https://drive.google.com/drive/folders/1lnpgDhDp8FqmBfb9UoKssWZavkF0tfJ3?usp=sharing" target="_blank"&gt;https://drive.google.com/drive/folders/1lnpgDhDp8FqmBfb9UoKssWZavkF0tfJ3?usp=sharing&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Can you please provide a solution for this issue.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jun 2022 08:29:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Cannot-infer-shape-for-node-Unsqueeze/m-p/1395417#M27653</guid>
      <dc:creator>Simardeep</dc:creator>
      <dc:date>2022-06-26T08:29:02Z</dc:date>
    </item>
    <item>
      <title>Re:Cannot infer shape for node Unsqueeze</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Cannot-infer-shape-for-node-Unsqueeze/m-p/1395962#M27681</link>
      <description>&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;Hi Simardeep,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;Thanks for reaching out to us. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;I’m able to convert your onnx model into Intermediate Represenation using the latest version of OpenVINO™ toolkit. Any opportunity from your end to try the latest version of OpenVINO™ toolkit? The latest version of OpenVINO™ toolkit 2022.1 provides functional bug fixes, and capability changes for the previous 2021.4.2 LTS release.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;Wan&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Jun 2022 06:27:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Cannot-infer-shape-for-node-Unsqueeze/m-p/1395962#M27681</guid>
      <dc:creator>Wan_Intel</dc:creator>
      <dc:date>2022-06-28T06:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot infer shape for node Unsqueeze</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Cannot-infer-shape-for-node-Unsqueeze/m-p/1395980#M27683</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a lot for your reply. Moving to v2022 is a great solution but I am working with RPI 4(64 bit) for which a stable release of v22 is not yet present. Hence, I am currently working with v21.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any specific model structure change that could solve this issue?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Simardeep&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2022 07:38:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Cannot-infer-shape-for-node-Unsqueeze/m-p/1395980#M27683</guid>
      <dc:creator>Simardeep</dc:creator>
      <dc:date>2022-06-28T07:38:59Z</dc:date>
    </item>
    <item>
      <title>Re:Cannot infer shape for node Unsqueeze</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Cannot-infer-shape-for-node-Unsqueeze/m-p/1396707#M27708</link>
      <description>&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;Hi Simardeep,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;We are investigating this issue, and we will update you at the earliest.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;Wan&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Jun 2022 08:46:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Cannot-infer-shape-for-node-Unsqueeze/m-p/1396707#M27708</guid>
      <dc:creator>Wan_Intel</dc:creator>
      <dc:date>2022-06-30T08:46:42Z</dc:date>
    </item>
    <item>
      <title>Re:Cannot infer shape for node Unsqueeze</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Cannot-infer-shape-for-node-Unsqueeze/m-p/1397675#M27748</link>
      <description>&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;Hi Simardeep,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;We've got a reply from the relevant team. There are a few libraries file changes to resolve the issue and it is available in the OpenVINO™ toolkit 2022.1 release. For a stable release, please stay tuned! Else, you can compile the &lt;/SPAN&gt;&lt;A href="https://github.com/openvinotoolkit/openvino" rel="noopener noreferrer" target="_blank" style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;OpenVINO™ toolkit from GitHub&lt;/A&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;Wan&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Jul 2022 01:18:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Cannot-infer-shape-for-node-Unsqueeze/m-p/1397675#M27748</guid>
      <dc:creator>Wan_Intel</dc:creator>
      <dc:date>2022-07-05T01:18:31Z</dc:date>
    </item>
    <item>
      <title>Re:Cannot infer shape for node Unsqueeze</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Cannot-infer-shape-for-node-Unsqueeze/m-p/1399875#M27835</link>
      <description>&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;Hi Simardeep,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;Thanks for your question.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;This thread will no longer be monitored since we have provided suggestions.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;If you need any additional information from Intel, please submit a new question. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; font-size: 16px;"&gt;Wan&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Jul 2022 03:57:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Cannot-infer-shape-for-node-Unsqueeze/m-p/1399875#M27835</guid>
      <dc:creator>Wan_Intel</dc:creator>
      <dc:date>2022-07-13T03:57:25Z</dc:date>
    </item>
  </channel>
</rss>

