Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
393 Views

Convert Mobilenet Tensorflow "retrained_graph.pb" and "retrained_labels.txt" to Movidius Graph

Hi @Tome_at_Intel

 

I followed the tutorial of retraining the tensorflow model as mentioned in the blog https://codelabs.developers.google.com/codelabs/tensorflow-for-poets/#0 .

 

I used the MobileNet model for the retraining.

 

After retraining I have downloaded the retrained pb file .

 

When I checked the retraining script was freezing the weights and saving in the pb file so I didnt use the tensorflow freeze script.

 

Now I tried to convert the pb file to the Movidius graph

 

mvNCCompile output_graph.pb -in=Placeholder -on=final_result mvNCCompile v02.00, Copyright @ Intel Corporation 2017 /usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py:871: DeprecationWarning: builtin type EagerTensor has no __module__ attribute /usr/local/lib/python3.5/dist-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() instead /usr/local/lib/python3.5/dist-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() instead shape: [1, 224, 224, 3] [Error 5] Toolkit Error: Stage Details Not Supported: Top Not Found module_apply_default/hub_input/Sub

 

you can download the pb file from (https://drive.google.com/drive/folders/1FHdCel1abtSa92F88WfRJsbWKxBT3kLV?usp=sharing)

 

I am able to run the Mobilenet example from the ncappzoo .

 

I had read in some blogs there is some stage not implemented I this something related to that ? But since I can run Mobilenet from ncappzoo and this also has the same network, so i beleive this should also compile.

Tags (1)
0 Kudos
2 Replies
idata
Community Manager
110 Views

Hi @Tome_at_Intel

 

On further investigation in the retrained pb file I found

 

I converted the pb to pbtxt file and did a grep for "hub_input/Sub"

 

and found this

 

node { name: "module_apply_default/hub_input/Sub" op: "Sub" input: "module_apply_default/hub_input/Mul" input: "module_apply_default/hub_input/Sub/y" attr { key: "T" value { type: DT_FLOAT } } }

 

I think this is not yet implemented in mvNCCCompile .

 

Because this is missing in the original MobileNet pbtext from google.

 

Is there any plans of adding this ? Can you provide me some hack around it ?

idata
Community Manager
110 Views

@deebuls Pete uses some TensorFlow operations that we don't support. A possible alternative would be to use Ashwin's TF Flower retraining project @ https://github.com/ashwinvijayakumar/ncappzoo/tree/flowers/apps/flowers. You will need to update the TF_MODELS_PATH and TF_SRC_PATH in the make file and then run a make train and then make run

Reply