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.
6404 Discussions

Operation 'slice' not supported for SqueezeNet for MXNet

Gouveia__César
New Contributor I
320 Views

Hi,

I tried to convert a mxnet squeezenet model to an optimized Intermediate Representation (IR) using the OpenVino toolkit. I use the following command to convert:

python mo_mxnet.py --input_model squeezenet-0000.params --input_shape (1,3,320,320) --output converted_model

But when I try to run it it shows the following error:

[ ERROR ]  Operation 'slice' not supported. Please register it as custom op.
 For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #86.
Unexpected exception happened during extracting attributes for node transpose1.
Original exception message: Operation 'slice' not supported. Please register it as custom op.

 

I know that this operation is not currently supported on OpenVino. In order to register it as a custom op I know that I need to create a slice_ext.py in the extensions/front/mxnet path location and a slice.py in the mo/ops. I'm currently running the latest release of OpenVino (R3) and the repository already provides a slice.py. So, the only thing that needs to be implemented is the extension for mxnet (slice_ext.py). Since crop is the deprecated version of slice, and they basically do the same, I have copied the content from crop_ext.py to a new file named slice_ext.py. However, after I run again the model converter the same error appears (operation slice not supported). This makes no sense because I already have both files in the correct directories so the error should be different, and the operation should now be supported.

Has anyone implemented the mxnet slice layer in openvino model converter? Any tips?

Thanks,

César.

0 Kudos
0 Replies
Reply