- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am getting following error when I am running ModelOptimizer with the custom kernel created with VAD tool.
camry@deepak:~/deep_learning_sdk_2017.1.0.2778/deployment_tools/model_optimizer/bin$ ./ModelOptimizer -w ~/myTiny.caffemodel -p FP16 -d ~/Downloads/my-tiny.prototxt --target APLK --network LOCALIZATION -b 1 -o ~/myOut/ -f 1.0 -k ~/MyCustomkernel/ -dm -c
Start working...
Framework plugin: CAFFE
Target type: APLK
Network type: LOCALIZATION
Batch size: 1
Precision: FP16
Layer fusion: true
Output directory: /home/deepak/myOut
Custom kernels directory: /home/deepak/MyCustomkernel/
Code generation mode: RELEASE
Network input normalization: 1
Normalized model was saved to: /home/deepak/custom/tiny/Binaries/
Could not register C function: PublishKernels make sure your custom layer plugin is correct!
May I know the reason for this ?
MyCustomKernel directory contains following files: libuser_kernel_stubs.so CustomLayersMapping.xml user_kernel_name.h user_kernel_name_module.c userKernelLibraryDetails.xml user_kernel_stubs.h
Thank you.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Deepak,
We are trying to reproduce, please allow us some time to investigate.
Regards,
Stav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Deepak,
The reason is that you probably have in the same folder an unrelated .so file.
MO assumes that this is a customer kernel registration file and expects to find the PublishKernels funstions
so what you need to do is remove the second .so file and leave only the registration .so file...
If you are still having issues I would love to get your files to try myself...
Regards,
Stav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Stav,
My directory contains only one shared library (.so file). I have generated my shared library as mentioned in this question, (I have referred this). I have attached the .c/.h files also.556863
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Deepak,
OK! now i understand the issue.
There are several types what can be referred to as "custom kernels" and it is a little confusing. Just for the sake of clarity, in the SDK you have 2 components, VAD and MO.
VAD is meant to help you develop OpenVX code by graphs level and support using OpenVX Kernels- you can use the VAD Ready kernels or you can write your own if you wish to add capabilities. When you write your own OpenVX Kernel- it is called "Custom Kernel".
MO is meant to optimize your DL Module- to do so it can work with known layers from common. or, if you have your own layer in the module and would like to optimize it- you may also create your own layer usually called "Custom Layer".
Now, what you have done is to generate a VAD Custom Kernel and try to load it as a custom layer to MO. This is the reason for the error. What you need to do is create custom layer by using MO Documentation. it can be found here.
I apologize for the mixed terms in documentations, it makes it very hard to understand and we will work on improving it, so thanks for helping us improve the product.
Regards,
Stav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK. Thanks for clarifying my doubt.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page