openvinotoolkit / openvino

OpenVINO™ is an open-source toolkit for optimizing and deploying AI inference
https://docs.openvino.ai
Apache License 2.0
7.36k stars 2.3k forks source link

TF ssdv2 to IRv10 error: "Preprocessor/mul" has 2 producers #1249

Closed GotG closed 4 years ago

GotG commented 4 years ago

TF ssdv2 to IRv10 error: "Preprocessor/mul" has 2 producers

Hello, this is the first time I get this error. Last week it was working. The mobilenet ssd v2 models output by TF obj det api in colab were working last week. Now I receive an error on conversion:

I tried both 20.01 and 20.03.

See below for command and error. Thanks!

python /opt/intel/openvino_2020.3.194/deployment_tools/model_optimizer/mo.py \

--input_model frozen_inference_graph.pb \

--tensorflow_use_custom_operations_config /opt/intel/openvino_2020.3.194/deployment_tools/model_optimizer/extensions/front/tf/ssd_v2_support.json \

--tensorflow_object_detection_api_pipeline_config pipeline.config \

--reverse_input_channels \

--output_dir ./frozen_model \

--data_type FP16\

[ ERROR ] Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.front.ChangePlaceholderTypes.ChangePlaceholderTypes'>): Something bad has happened with graph! Data node "Preprocessor/mul" has 2 producers

jgespino commented 4 years ago

Hi @GotG

Could you share a link to the model that you are using? Is it a pre-trained or custom trained model? I was able to convert the ssd_mobilenet_v2_coco from the open model zoo with OpenVINO toolkit 2020.3 successfully.

python3 /opt/intel/openvino/deployment_tools/tools/model_download/downloader.py --name ssd_mobilenet_v2_coco

python3 /opt/intel/openvino/deployment_tools/model_optimizer/mo.py \
--input_model frozen_inference_graph.pb \
--framework tf \
--tensorflow_use_custom_operations_config /opt/intel/openvino/deployment_tools/model_optimizer/extensions/front/tf/ssd_v2_support.json \
--tensorflow_object_detection_api_pipeline_config pipeline.config \
--batch 1 \
--data_type FP16 \
--reverse_input_channels

Regards, Jesus

GotG commented 4 years ago

It is a custom model which previously worked. It is a result of TF Obj Det API. Please try it: https://drive.google.com/file/d/1--KtGV5OqVDg13whyMK41ZRSzlCGucxV/view?usp=sharing

jgespino commented 4 years ago

Hi @GotG

I also see the "Preprocessor/mul" has 2 producers error. What is different with your custom trained model from last week? Did you update the TensorFlow version? Have you tried freezing the model again? If you can also share the pipeline.config for this custom trained model.

Regards, Jesus

GotG commented 4 years ago

the latest TF Object Detection API commit produces these models. by using a previous commit the model can be converted successfully.

MengNan-Li commented 4 years ago

Hi @GotG , Could you share the verson of Object Detection API and model. I have the same question like you. Thinks

MengNan-Li commented 4 years ago

I converted the model successfully. The reason for the previous failure is what i renamed "model.ckpt.meta" to "model.ckpt".