openvino: Fail to convert elementwise_mul when read a paddle model
System information (version)
- OpenVINO Source=> GitHub #17525
- OpenVINO Version=> 2022.3
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2019 / Cmake
- Problem classification => Model Conversion
- Device use: => CPU
- Framework => PaddlePaddle
- Model name => DINO link
Detailed description
An error occurs when I read a paddle model (DINO). How could I identify this problem and solve it?
Traceback (most recent call last):
File "test_dino.py", line 228, in <module>
ov_model = core.read_model(paddle_file)
RuntimeError: Check 'false' failed at path_to_openvino\src\inference\src\core.cpp:100:
Check 'false' failed at path_to_openvino\src\frontends\paddle\src\frontend.cpp:66:
FrontEnd API failed with OpConversionFailure: :
Fail to convert elementwise_mul Exception Check 'args_et.is_dynamic() || args_et != element::boolean' failed at path_to_openvino\src\core\src\op\util\binary_elementwise_arithmetic.cpp:32:
While validating node 'opset1::Multiply Multiply_19803 (tmp_253[0]:boolean[?,?,4], tmp_255[0]:boolean[?,?,4]) -> (dynamic[...])' with friendly_name 'Multiply_19803':
Arguments cannot have boolean element type (argument element type: boolean).
Steps to reproduce
- Download DINO model (dino_r50_4scale_1x_coco.pdparams) and export it followed the [instruction ](https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.6/deploy/EXPORT_MODEL.md.
python tools/export_model.py -c configs/configs/dino/dino_r50_4scale_1x_coco.yml --output_dir=./inference_model \
-o weights=weights/dino_r50_4scale_1x_coco.pdparams
- Read and compile the dino model.
import cv2
import numpy as np
from openvino.tools import mo
from openvino.runtime import serialize, Core
inputs = {
'image' = np.random.rand(1,3,800,1333),
'scale_factor': np.array([[1., 1.]], dtype=np.float32),
'im_shape': np.array([[800., 1333.]], dtype=np.float32),
}
core = Core()
ov_model = core.read_model(paddle_file)
ov_model = core.compile_model(ov_model, device_name="CPU")
results = ov_model(inputs)
Issue submission checklist
- I report the issue, it’s not a question
- I checked the problem with documentation, FAQ, open issues, Stack Overflow, etc and have not found solution
- There is reproducer code and related data files: images, videos, models, etc.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 22 (12 by maintainers)
@meiyang-intel You have such a high work efficiency! ☕