Is there an example with Tensorflow python code on how to create a graph that is compatible with the "snpe-tensorflow-to-dlc" tool?
These rules are found in the documentation, but a code example would be easier to learn from
- All nodes belonging to a layer must be defined in a unique TensorFlow scope.
- A node can only belong to a single layer.
The snpe-tensorflow-to-dlc converter by default uses a strict layer resolution algorithm which requires all nodes in the Tensorflow graph to be resolved to a layer. If your graph has nodes which are not related to a layer such as training nodes, you may be required to use the -—allow_unconsumed_nodes converter option.
I saved the mnist_deep.py example from: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples...
as a protobuf file and was unable to convert the .pb file to .dlc.
This is the python code I am using. Just a few modifications such as: naming the input and output nodes, and saving a .pb file.
And this is the command I use to convert to dlc:
snpe-tensorflow-to-dlc --graph mnist.pb --input_dim "input_node" 28,28,1 --dlc test.dlc --out_node "output_node" --allow_unconsumed_nodes
I tried with and without the allow_unconsumed_nodes option.
In the documentation, under the Examples Tutorial -> Tutorials Setup, it is explained how to get Inception v3 example from TensorFlow.
You can use the python file of Inception v3 as an example for a model than can be converted.
Also, it would be helpful if you can provide the error than you receive from the converter.
Thanks for your reply.
Edit: removed stackoverflow question
I am interested in the python script used to generate th Protobuf file from the archive in the link you have provided.
I've managed to create a Protobuf file from the attached script. However, when I run the dlc conversion tool I get the following error:
The conversion tool command I am using is: snpe-tensorflow-to-dlc --graph mnist_frozen.pb --input_dim input_node 28,28,1 --dlc wtf.dlc --out_node softmax_output
Bumping this post in hope of getting support :)