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.

Problem with converting 2 input model using Model Optimizer

Karol_D_Intel
Employee
488 Views

Hi All, 

  I'm trying to convert a very basic model (saved as Tensorflow freezed graph) to IR format using mo_tf.py script. The model has 2 inputs - they are basically 1D vectors of length 16: input_x_float and input_y_float 

  Based on the documentation I deduced that I need to use the following syntax:

python mo_tf.py --input_model element_wise_mul_float.pb --input input_x_float[1,16],input_y_float[1,16]

This gives me the following error:

[ ERROR ]  Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.front.user_data_repack.UserDataRepack'>): No node with name input_x_float[1.
 For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #51.

I'm assuming that I have used wrong syntax of the command but after I trying several different variations I wasn't able to successfully run the command.I'm attaching the .pb model file If anyone wants to try the conversion on their side :)

Can anybody suggests me something?

Thanks in advance for your help.

 

0 Kudos
1 Solution
Shubha_R_Intel
Employee
488 Views

Dear Karol Duzinkiewicz,

Here is how you do it. But the help is extremely confusing. It should be corrected actually, I will file a bug. When I did this command Model Optimizer successfully generated IR:

python "c:\Program Files (x86)\IntelSWTools\openvino_2019.2.275\deployment_tools\model_optimizer\mo_tf.py" --input_model element_wise_mul_float.pb --input "input_x_float","input_y_float" --input_shape (1,16),(1,16)

Hope it helps,

Thanks,

Shubha

 

View solution in original post

0 Kudos
5 Replies
Shubha_R_Intel
Employee
488 Views

Dear Karol Duzinkiewicz,

When I dump your frozen pb to text, I see this (note the prefix/ part). So you should use "prefix/input_x_float" and "prefix/input_y_float" as your input layer names. You could have also found the correct hierarchical name out by viewing your frozen pb in Tensorboard.

 

node {
  name: "prefix/input_x_float"
  op: "Placeholder"
  attr {
    key: "dtype"
    value {
      type: DT_DOUBLE
    }
  }
  attr {
    key: "shape"
    value {
      shape {
        dim {
          size: -1
        }
        dim {
          size: 16
        }
      }
    }
  }
}
node {
  name: "prefix/input_y_float"
  op: "Placeholder"
  attr {
    key: "dtype"
    value {
      type: DT_DOUBLE
    }
  }

Hope it  helps,

Thanks,

Shubha

0 Kudos
Shubha_R_Intel
Employee
488 Views

Dear Karol Duzinkiewicz,

Actually I tried the mo_tf.py with prefix and it still doesn't work. I get your same error, which is odd. I'm still researching...it may be a bug. Will let you know...

Shubha

0 Kudos
Shubha_R_Intel
Employee
489 Views

Dear Karol Duzinkiewicz,

Here is how you do it. But the help is extremely confusing. It should be corrected actually, I will file a bug. When I did this command Model Optimizer successfully generated IR:

python "c:\Program Files (x86)\IntelSWTools\openvino_2019.2.275\deployment_tools\model_optimizer\mo_tf.py" --input_model element_wise_mul_float.pb --input "input_x_float","input_y_float" --input_shape (1,16),(1,16)

Hope it helps,

Thanks,

Shubha

 

0 Kudos
Karol_D_Intel
Employee
488 Views

Wow! I would have never figured this out by myself :) Thanks a lot !!!

0 Kudos
Shubha_R_Intel
Employee
488 Views

Dear Karol Duzinkiewicz,

Of course ! Glad to help.

Shubha

0 Kudos
Reply