Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Carlyon__Shane
Beginner
176 Views

Cannot use YOLOV3 with CPU after optimizing

I swear that I have exactly followed the official instruction - https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_convert_model_tf_specific_Convert_YOLO_From_Tensorflow.html

Of course, I didn't add `--data_type=FP16` as I wanted to use this model on my CPU.

But unfortunately this replies with an error message:

```

exec_net = plugin.load(network=net, num_requests=2)
  File "ie_api.pyx", line 547, in openvino.inference_engine.ie_api.IEPlugin.load
  File "ie_api.pyx", line 557, in openvino.inference_engine.ie_api.IEPlugin.load
RuntimeError: Unsupported primitive of type: Resample name: detector/yolo-v3/ResizeNearestNeighbor

```

Any idea?

 

P.S.

- Ubuntu 18.04

- Python3.6

- Tensorflow 1.12.0

0 Kudos
3 Replies
Sahira_Intel
Moderator
176 Views

Hi Shane,

If you're getting the unsupported primitive error, try adding -I <PATH_TO cpu_extension.dll> (or cpu_extension.so)

Please let me know if this is helpful.

Best Regards,

Sahira 

Carlyon__Shane
Beginner
176 Views

@Sahira

        device = "CPU"
        model_bin = os.path.splitext(model_xml)[0] + ".bin"
        self.plugin = IEPlugin(device=device)
        self.net = IENetwork(model=model_xml, weights=model_bin)
        ie = IECore()
        ie.add_extension(
            "/opt/intel/openvino/deployment_tools/inference_engine/lib/intel64/libcpu_extension_sse4.so", "CPU")
        supported_layers = ie.query_network(self.net, "CPU")
        not_supported_layers = [l for l in self.net.layers.keys() if l not in supported_layers]
        if len(not_supported_layers) != 0:
            logger.error(f"Following layers are not supported by the plugin for specified "
                         f"device {device}:\n {', '.join(not_supported_layers)}")

        assert len(self.net.inputs.keys()) == 1, "Sample supports only YOLO V3 based single input topologies"
        assert len(self.net.outputs) == 3, "Sample supports only YOLO V3 based triple output topologies"

 

I added ie.add_extension() function as your suggestion, but same result... :/

Sahira_Intel
Moderator
176 Views

Hi Shane,

Can you please provide your model so I can take a look at it? If you'd rather share your model over a PM please let me know.

Best Regards,
Sahira 

Reply