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.

How to use -on option in mvNCCompile

idata
Employee
726 Views

There is a command line in doc: "mvNCCompile inception-v1.meta -s 12 -in=input -on=InceptionV1/Logits/Predictions/Reshape_1 -is 224 224 -o InceptionV1.graph"

 

I think we use -in=input because we have the following code:

 

"image = tf.placeholder("float", [1, image_size, image_size, 3], name="input")"

 

how do we come up -on= InceptionV1/Logits/Predictions/Reshape_1?

 

Thanks.

 

-Tony
0 Kudos
4 Replies
idata
Employee
464 Views

@tzxu Tensorflow is hierarchical in terms of how layers are defined. With the example you provided, "InceptionV1/Logits/Predictions/Reshape_1", the Reshape_1 layer is being used as the output node and it is located inside of the Predictions function which is inside of the Logits function which is in the InceptionV1 network.

 

In regards to finding the input and output nodes for your network, you can try using the summarize_graph tool found at https://github.com/tensorflow/tensorflow/tree/master/tensorflow/tools/graph_transforms#inspecting-graphs to inspect your model and it will try to find the input and output nodes for your model.

0 Kudos
idata
Employee
464 Views

Thanks.

0 Kudos
idata
Employee
464 Views

Here is what I have done to find out the nodes' names.

 

in the inception_v1.py: add one line for tensorboard to display

 

with tf.Session() as sess:

 

init_fn(sess)

 

summary_writer = tf.summary.FileWriter("./tensorflow_logs/inception_v1/", graph=tf.get_default_graph()) #add a line here

 

saver = tf.train.Saver(tf.global_variables())

 

saver.save(sess, "output/"+name)

 

then run:

 

     

  1. python3 inception_v1.py
  2.  

  3. tensorboard --logdir=./tensorflow_logs
  4.  

  5. go to a browser http://localhost:6006
  6.  

  7. click on graph, in the graph, we can see all nodes' names.
  8.  

0 Kudos
idata
Employee
464 Views

@tzxu Awesome! Thank you for posting that!

0 Kudos
Reply