Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Error] Action Recognition : Convert ONNX to IR file #227

Closed
Nhoodangggggg opened this issue Feb 21, 2020 · 3 comments
Closed

[Error] Action Recognition : Convert ONNX to IR file #227

Nhoodangggggg opened this issue Feb 21, 2020 · 3 comments
Assignees
Labels
BUG Something isn't working

Comments

@Nhoodangggggg
Copy link

Nhoodangggggg commented Feb 21, 2020

I tried to to convert the ONNX models to OpenVINO format. My model is resnet34_vtn_rgb_decoder.onnx and converted by the following commands

mo.py \
--data_type FP16 \
--input_model ./pretrained_models/resnet34_vtn_rgb_decoder.onnx \
--input_shape [1,16,512]

But it failed and I got this message :

[ ERROR ] Cannot infer shapes or values for node "258/Broadcast".
[ ERROR ] 'numpy.float64' object cannot be interpreted as an integer
[ ERROR ]
[ ERROR ] It can happen due to bug in custom shape infer function <function Broadcast.infer at 0x10cbe24d0>.
[ ERROR ] Or because the node inputs have incorrect values/shapes.
[ ERROR ] Or because input shapes are incorrect (embedded to the model or passed via --input_shape).
[ ERROR ] Run Model Optimizer with --log_level=DEBUG for more information.
[ ERROR ] 'numpy.float64' object cannot be interpreted as an integer
Stopped shape/value propagation at "258/Broadcast" node.
For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #38.

I downloaded the pretrain model from https://github.com/opencv/openvino_training_extensions/tree/develop/pytorch_toolkit/action_recognition

and then I covert to ONNX on google colab by the following command

!python "/content/openvino_training_extensions/pytorch_toolkit/action_recognition/main.py"
--clip-size 16 --st 2 --model resnet34_vtn_decoder \
--pretrain-path ./resnet_34_vtn_rgb_kinetics.pth
--onnx ./resnet_34_vtn_rgb_kinetics_onnx.onnx
--no-layer-norm --no-cuda

Could you tell me how to solve this problem ?

@Nhoodangggggg Nhoodangggggg added the BUG Something isn't working label Feb 21, 2020
@minhhoangbui
Copy link

I have a same issue. Do you use which version of OpenVino to convert onnx file?

@Nhoodangggggg
Copy link
Author

I used Openvino 2019_R3.1 and also 2020.1

@minhhoangbui
Copy link

I use 2019R2 and 2020R1, I wonder they use which version :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants