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

Inference with multiple outputs

Ohad_M_Intel
Employee
539 Views

I have a Pytorch model that I exported to onnx and from onnx to OpenVino.

the model has multiple outputs. defined like this in the Python code:

class model(nn.Module):
    def __init__(self):
        super(model, self).__init__()
        """
        Define the model
        """
        
    def forward(self, x):
        """
        Define the forward pass
        """
        return [output1, output2, output3]

When I try to run it using Python API I get this error:

[ INFO ] Loading network files:
        sfd.xml
        sfd.bin
Traceback (most recent call last):
  File "classification_sample.py", line 137, in <module>
    sys.exit(main() or 0)
  File "classification_sample.py", line 68, in main
    net = IENetwork(model=model_xml, weights=model_bin)
  File "ie_api.pyx", line 271, in openvino.inference_engine.ie_api.IENetwork.__cinit__
RuntimeError: Error reading network: Error of validate layer: output0 with type: Split. The sum of the dimensions on the axis(1) is not equal out_sizes: [1]

 

Any advice here? Thanks.

0 Kudos
4 Replies
Severine_H_Intel
Employee
539 Views

Dear Ohad, 

something must be wrong with the xml file, can you send it to the model (onnx) ? (to my email).

Best, 

Severine

Ohad_M_Intel
Employee
539 Views

Sent the files via Email (and Google Drive).

Shubha_R_Intel
Employee
539 Views

Dear Ohad M. 

Severine is on vacation for the next couple of weeks. You can email me the files. Since you work for intel, just email them to my Outlook email address.

Thanks,

Shubha

Ohad_M_Intel
Employee
539 Views

Sent. thanks.

Reply