- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have a custom deep neural network that I developed with tensorflow and tflearn.
I have as an ouput file a .pb one so I guess no need to freeze it again so jumped directly to the compile step.
To do so I got inspired by this tutorial: https://github.com/ashwinvijayakumar/ncappzoo/tree/single-conv/tensorflow/single-conv
So here is the status:
I have a custom project located here:
~/worspace/ncappzoo/tensorflow/custom
It contains:
- a Makefile (from tutorial evoked earlier)
- a model dir containing my model_frozen.pb file
When I run a make compile, I have this error coming out: KeyError: "The name 'input:0' refers to a Tensor which does not exist. The operation, 'input', does not exist in the graph."
This raised several questions:
- My code is mainly based on tflearn can it comes from here? is is possible to use tflearn saved models on movidius?
- If this comes from an input issues, where can I fix this (took a look at the Makefile but I'm new to this (makefile and tf) so this is quite blurry to me)?
- Maybe I've been using the wrong way to implement my custom model on movidius (myriad 2)? Already tried to follow these advises without any success and start to be quite disapointed at this stage: https://ncsforum.movidius.com/discussion/339/is-there-a-tutorial-or-documentation-for-running-custom-tensorflow-network-in-movidius#latest
Thanks for answer
Ragards
- Tags:
- Tensorflow
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My bad, after some more research, I finally used:
bazel-bin/tensorflow/tools/graph_transforms/summarize_graph --in_graph=/home/magaly/workspace/ncappzoo/tensorflow/model_frozen.pb
And then:
mvCCompile directly on my model_frozen.pb:
mvNCCompile ncappzoo/tensorflow/custom/lstm-1-layer-64.pb -in input_lstm/X -on softmax_layer/Softmax
Then, I have a transposition error as follow:
[Error 5] Toolkit Error: Stage Details Not Supported: Transpose
I precise that I am using an lstm (reccurent model) apparently they were not supported… > https://ncsforum.movidius.com/discussion/105/recurrent-caffe-models
Maybe some updates on this ?
M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@malonzo Thanks for your interest in the NCS. There are some TF operations that the NCSDK still doesn't have support for and tf.transpose() is one of these operations. I wonder if you can use numpy's transpose to replace TF's transpose operation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Tome_at_Intel Thank you for your feedback, I will try this and let you know if it does the trick.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, @Tome_at_Intel
Actually we decided to focus on making the inception_v3 part running on movidius as the LSTM one is not the more demanding.
On this, I would have a question: indeed we used to use 2015 version of inception_v3 that was published only with a .pb file (no .ckpt) this make tricky the use of mvNCCompile especially because we don't stop at the softmax layer but before. Do you have any feed-back on using it? indeed, in this version we use the pool_3/_reshape output layer that has a 2048 array output where the 2016 InceptionV3/Prediction/Reshape one has 1001. Changing the algorythm there would have a huge impact on the other part of the code and we would really ike to be able to use 2015 version.
Regards
Magaly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@malonzo You can use mvNCCompile and specify the output node with the -on option if I am understanding this correctly. This should output a graph file that uses whatever layer you specified with the -on option as the output layer. For example, if you wanted to use the pool_3/reshape output layer as the final layer for your graph file, you can use the following example command: mvNCCompile example.pb -on pool_3/reshape -s 12
.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Tome_at_Intel Thanks, it finally kind of work, there was an issue with the way to save the model which really needs to be clean.
As a reminder, do not forget to remove all the training variables (this is what leads to some weird errors).
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page