openvino: [Bug] Failure to serialize IENetwork into xml/bin

System information (version)
  • OpenVINO => 2021.1
  • Operating System / Platform => Ubuntu 18.04 LTS
  • Problem classification: Model Serialization
Detailed description

When trying to serialize a model created using the ngraph and function APIs, the serialization fails with an IR 10 not implemented error

Steps to reproduce

Used Python 3.6.9

from openvino.inference_engine import IECore, IENetwork
import ngraph as ng

param_x = ng.parameter(shape=[1, 16], dtype=np.float32, name="INPUT0")
param_y = ng.parameter(shape=[1, 16], dtype=np.float32, name="INPUT1")
result0 = ng.subtract(param_x, param_y, name="OUTPUT0")
result1 = ng.subtract(param_x, param_y, name="OUTPUT1")

function = ng.impl.Function([result0, result1], [param_x, param_y], "AddSub")
ie_network = IENetwork(ng.impl.Function.to_capsule(function))
ie_network.serialize("./serialized.xml", "./serialized.bin")

I get the following error:

  File "x.py", line 18, in <module>
    ie_network.serialize("./serialized.xml", "./serialized.bin")
  File "ie_api.pyx", line 1579, in openvino.inference_engine.ie_api.IENetwork.serialize
RuntimeError: The serialize for IR v10 is not implemented
Issue submission checklist
  • I report the issue, it’s not a question
  • I checked the problem with documentation, FAQ, open issues, Stack Overflow, etc and have not found solution
  • There is reproducer code and related data files: images, videos, models, etc.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

Ignore the previous comment. I needed additional deps that are described here.

@CoderHam IE python wheel build is enabled only if -DENABLE_WHEEL=ON is passed to cmake. Please, try this option.

@CoderHam could you please try the latest master or release/2021/3 branch? These branches contain this functionality while for older releases it’s really not implemented