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.

convert_model DISK

mattiasmarder
Employee
614 Views

Hello,

 

I'm attempting to compile DISK with OpenVINO.

Though sending the PyTorch model to torch.jit.trace works, calling openvino.convert_model on the model fails.

 

I've create a fork of the original git repo to demonstrate the problem: https://github.com/mattiasmar/disk
To see the error, do:

pip install -r requirements.txt

and

python3 detect.py  h5_artifacts_destination images_directory
 
I get this exception:

 

Exception has occurred: OpConversionFailure
Check 'is_conversion_successful' failed at src/frontends/pytorch/src/frontend.cpp:138:
FrontEnd API failed with OpConversionFailure:
Model wasn't fully converted. Failed operations detailed log:
-- prim::Constant with a message:
None constant cannot be converted to OpenVINO opset and should be removed by consuming operation.
-- prim::ListConstruct with a message:
Exception happened during conversion of operation prim::ListConstruct_392 with schema (no schema)
Check 'c_node' failed at src/frontends/pytorch/src/op/list_construct.cpp:25:
FrontEnd API failed with OpConversionFailure:
Translation for prim::ListConstruct support only constant inputs

Summary:
-- normalize step failed with: Check 'dim.compatible(1)' failed at src/core/shape_inference/include/squeeze_shape_inference.hpp:105:
While validating node 'opset1::Squeeze aten::squeeze/Squeeze_206 (aten::squeeze/Squeeze_205[0]:f32[1,46,68], 10[0]:i32[]) -> (f32[...])' with friendly_name 'aten::squeeze/Squeeze_206':
provided axis value is invalid. Only axes of size 1 may be removed.

-- No conversion rule found for operations: aten::bernoulli, aten::binary_cross_entropy_with_logits, aten::logsumexp, aten::multinomial, aten::numpy_T
-- Conversion is failed for: prim::Constant, prim::ListConstruct
  File "/open/disk/detect.py", line 264, in <module>
    ov_model = convert_model(model, example_input=batched_image,input=PartialShape(input_dimensions))
openvino._pyopenvino.OpConversionFailure: Check 'is_conversion_successful' failed at src/frontends/pytorch/src/frontend.cpp:138:
FrontEnd API failed with OpConversionFailure:
Model wasn't fully converted. Failed operations detailed log:
-- prim::Constant with a message:
None constant cannot be converted to OpenVINO opset and should be removed by consuming operation.
-- prim::ListConstruct with a message:
Exception happened during conversion of operation prim::ListConstruct_392 with schema (no schema)
Check 'c_node' failed at src/frontends/pytorch/src/op/list_construct.cpp:25:
FrontEnd API failed with OpConversionFailure:
Translation for prim::ListConstruct support only constant inputs

Summary:
-- normalize step failed with: Check 'dim.compatible(1)' failed at src/core/shape_inference/include/squeeze_shape_inference.hpp:105:
While validating node 'opset1::Squeeze aten::squeeze/Squeeze_206 (aten::squeeze/Squeeze_205[0]:f32[1,46,68], 10[0]:i32[]) -> (f32[...])' with friendly_name 'aten::squeeze/Squeeze_206':
provided axis value is invalid. Only axes of size 1 may be removed.

-- No conversion rule found for operations: aten::bernoulli, aten::binary_cross_entropy_with_logits, aten::logsumexp, aten::multinomial, aten::numpy_T
-- Conversion is failed for: prim::Constant, prim::ListConstruct

 

0 Kudos
1 Reply
mattiasmarder
Employee
613 Views

P.s. Tested on Ubuntu22 with OpenVINO 2023.2

0 Kudos
Reply