- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am having some problems when compiling models from Keras Application to Movidius graph file.
What I did:
save model
from keras.applications import MobileNetV2, VGG16, MobileNet from keras import backend as K mn = MobileNet() saver = tf.train.Saver() sess = K.get_session() saver.save(sess, "./mv2") tf.train.write_graph(sess.graph_def, ".", "graph.pbtxt")
use Tensorflow script to create a frozen graph
python -m tensorflow.python.tools.freeze_graph --clear_devices --input_graph graph.pbtxt --input_checkpoint mv2 --output_node_names "reshape_2/Reshape" --output_graph graph.frozen.pb
convert the frozen graph to Movidius graph
mvNCCompile -s graph.frozen.pb -in=input_3 -on=reshape_2/Reshape
Then mvNCCompile throws: [Error 5] Toolkit Error: Stage Details Not Supported: FusedBatchNorm inputs mean and variance are not defined. The graph is not created for inference.
If I do the exactly the same thing for VGG16, which means replacing "mn=MobileNet()" with "mn=VGG16()", everything works perfectly, so I am assuming the error has something to do with the BatchNorm layers used in MobileNet? Any suggestion on how I can get rid of this error?
- Tags:
- Keras
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok, now we get that NCSDK does not support keras
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
any news about this? I'm having a similar issue!
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page