Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

OpenVINO: MYRIAD RuntimeError

Han__Tianyi
Beginner
401 Views

I am running into some trouble when trying to use Inference Engine on the NCS through the python API (python 3.7.3, Host Windows 10, ONNX PyTorch)

I don't see this error with this same model for CPU or GPU. The error is in the code of creating exe_net

exec_net = plugin.load(network=net)

 

Traceback (most recent call last):
  File "C:/Users/Hans/Desktop/alexnet_vote/test.py", line 204, in <module>
    main(testdata, test_mapping)
  File "C:/Users/Hans/Desktop/alexnet_vote/test.py", line 138, in main
    exec_net = plugin.load(network=net)
  File "ie_api.pyx", line 551, in openvino.inference_engine.ie_api.IEPlugin.load
  File "ie_api.pyx", line 561, in openvino.inference_engine.ie_api.IEPlugin.load
RuntimeError: Failed to infer shapes for Reshape layer (38) with error: Invalid reshape mask (dim attribute): number of elements in input: [1,256,6,6] and output: [10,9216] mismatch
 

		<layer id="16" name="38" precision="FP16" type="Reshape">
			<input>
				<port id="0">
					<dim>10</dim>
					<dim>256</dim>
					<dim>6</dim>
					<dim>6</dim>
				</port>
				<port id="1">
					<dim>2</dim>
				</port>
			</input>
			<output>
				<port id="2">
					<dim>10</dim>
					<dim>9216</dim>
				</port>
			</output>
		</layer>

 

0 Kudos
1 Reply
Shubha_R_Intel
Employee
401 Views

Dear Han, Tianyi,

Are you using the latest OpenVino Release 20192.01 ?

 with error: Invalid reshape mask (dim attribute): number of elements in input: [1,256,6,6] and output: [10,9216] mismatch

Looking at the error 256*6*6 = 9216. But the first position 1 is batch size. What happens when you re-run model optimizer this time with  --batch 10 ?

thanks,

Shubha

 

0 Kudos
Reply