Reputation: 965
I converted an onnx model to IR using
python3 mo_onnx.py --input_model SSD_nms.onnx --input inputs,top_k_per_class,nms_iou,nms_score --input_shape [1,3,224,224],[1],[1],[1]
This step worked fine, but when I try to load the network it gives me the following error.
ie = IECore()
net = ie.read_network(model=model_path, weights=weights_path)
print (net.layers)
File "ie_api.pyx", line 1170, in openvino.inference_engine.ie_api.IENetwork.layers.__get__ ValueError: get_shape was called on a descriptor::Tensor with dynamic shape
I was able to successfully run the same model minus the last NMS layer. Not sure why this fails. Viewing the IR xml file on netron doesn't show anything off.
The entire layer description which causes trouble:
<layer id="351" name="selected_indices" type="NonMaxSuppression" version="opset1">
<data box_encoding="center" sort_result_descending="0"/>
<input>
<port id="0">
<dim>1</dim>
<dim>10000</dim>
<dim>4</dim>
</port>
<port id="1">
<dim>1</dim>
<dim>2</dim>
<dim>10000</dim>
</port>
<port id="2"/>
<port id="3"/>
<port id="4"/>
</input>
<output>
<port id="5" precision="I64">
<dim>10000</dim>
<dim>3</dim>
</port>
</output>
</layer>
Removing the output layer from the IR makes things work normally.
Upvotes: 1
Views: 762