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.

[facenet] not support normalize layer (fixed)

Wang__Bill
Beginner
627 Views

Hi,

I successfully convert the facenet(20180402-114759) to XML/BIN.

However, the plugin said the normalize layer is not supported.

Is that true?

 

        plugin = IEPlugin(device='CPU', plugin_dirs=None)
        if args.cpu_extension and 'CPU' in args.device:
            plugin.add_cpu_extension(args.cpu_extension)

        net = IENetwork.from_ir(model=facenet_model_xml, weights=facenet_model_bin)

        if "CPU" in plugin.device:
            supported_layers = plugin.get_supported_layers(net)
            not_supported_layers = [l for l in net.layers.keys() if l not in supported_layers]
            if len(not_supported_layers) != 0:
                print("Following layers are not supported by the plugin for specified device {}:\n {}".
                      format(plugin.device, ', '.join(not_supported_layers)))
                print(
                    "Please try to specify cpu extensions library path in sample's command line parameters using -l "
                    "or --cpu_extension command line argument")
                sys.exit(1)

 

 

facenet link https://drive.google.com/file/d/1EXPBSXwTaqrSC0OhUdXNmKSh9qJUQ55-/view

openvino: computer_vision_sdk_2018.3.343

python 3.5

tensorflow 1.11.0

 

0 Kudos
6 Replies
Wang__Bill
Beginner
627 Views

I use cpu_extension which can support the normalize layer. 

0 Kudos
kao__mars
Beginner
627 Views

Hi Bill,

i have the same issue.

Can i know how to build the cpu_extension which can support normalize layer?

Thanks.

0 Kudos
kao__mars
Beginner
627 Views

Hi,

i can read the model by set cpu_extension which build by sample project.

Thanks.

0 Kudos
Shubha_R_Intel
Employee
627 Views

Dear kao, mars,

According to the Supported Devices document the Normalize layer is definitely supported on CPU, GPU and VPU. You should add the cpu_extension.dll (*.so) in your code ( I see it in the version of code you pasted above). Once you do, it should fix the problem.

Does it work for you ?

Thanks,

Shubha

0 Kudos
Shubha_R_Intel
Employee
627 Views

Dear kao, mars,

I noticed that your title says "fixed".  Thanks for reporting back to the community that your issue is now fixed.

Shubha

0 Kudos
kao__mars
Beginner
627 Views

Hi Shubha,

thanks for your reply.  After i load the  cpu extension, it can get the facenet model output well. But i found that it can't support the dynamic batch if the model need the extension (ex. model define the "normalize" layer in the last layer).

the document says:

Do not use layers that might arbitrary change tensor shape (such as Flatten, Permute, Reshape), layers specific to object detection topologies (ROIPooling, ProirBox, DetectionOutput), and "custom layers".

Any suggestion for this case?

Thanks. 

0 Kudos
Reply