Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® Distribution of OpenVINO™ Toolkit
- Compile Keras MobileNetV2 model to Movidius graph file

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

idata

Community Manager

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-27-2018
02:00 AM

419 Views

Compile Keras MobileNetV2 model to Movidius graph file

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?

Link Copied

2 Replies

idata

Community Manager

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-13-2018
05:57 AM

106 Views

ok, now we get that NCSDK does not support keras

idata

Community Manager

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-15-2018
03:58 AM

106 Views

any news about this? I'm having a similar issue!

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.