Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Community Manager
294 Views

mvNCCompile error for Inception-Resnet-V2 with tensorflow

Hi

 

I saw NCSDK 1.10.01 can support inception-resnet-v2. I train a "inception-resnet-v2" model with facenet.

 

But I want to covert this model to run in NCS, but I get the error during converting.

 

Please help me to check this or give a converting example for inception-resnet-v2 with tensorflow

 

My command is as below:

 

$mvNCCompile model-20171204-174419.meta -s 12 -in=input -on=InceptionResnetV2/Logits/Predictions/Reshape_1 -o inception-resnet-v2.graph

 

The error is as below:

 

mvNCCompile v02.00, Copyright @ Movidius Ltd 2016

 

/usr/local/lib/python3.5/dist-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() instead

 

if d.decorator_argspec is not None), _inspect.getargspec(target))

 

WARNING:tensorflow:The saved meta_graph is possibly from an older release:

 

'model_variables' collection should be of type 'byte_list', but instead is of type 'node_list'.

 

Traceback (most recent call last):

 

File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1327, in _do_call

 

return fn(*args)

 

File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1306, in _run_fn

 

status, run_metadata)

 

File "/usr/lib/python3.5/contextlib.py", line 66, in exit

 

next(self.gen)

 

File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/errors_impl.py", line 466, in raise_exception_on_not_ok_status

 

pywrap_tensorflow.TF_GetCode(status))

 

tensorflow.python.framework.errors_impl.NotFoundError: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for model-20171204-174419

 

[[Node: save/RestoreV2_740 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save/Const_0_0, save/RestoreV2_740/tensor_names, save/RestoreV2_740/shape_and_slices)]]

 

During handling of the above exception, another exception occurred:

 

Traceback (most recent call last):

 

File "/usr/local/bin/mvNCCompile", line 118, in

 

create_graph(args.network, args.inputnode, args.outputnode, args.outfile, args.nshaves, args.inputsize, args.weights)

 

File "/usr/local/bin/mvNCCompile", line 104, in create_graph

 

net = parse_tensor(args, myriad_config)

 

File "/usr/local/bin/ncsdk/Controllers/TensorFlowParser.py", line 192, in parse_tensor

 

saver.restore(sess, path[:path.rfind('.')])

 

File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 1560, in restore

 

{self.saver_def.filename_tensor_name: save_path})

 

File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 895, in run

 

run_metadata_ptr)

 

File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1124, in _run

 

feed_dict_tensor, options, run_metadata)

 

File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1321, in _do_run

 

options, run_metadata)

 

File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1340, in _do_call

 

raise type(e)(node_def, op, message)

 

tensorflow.python.framework.errors_impl.NotFoundError: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for model-20171204-174419

 

[[Node: save/RestoreV2_740 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save/Const_0_0, save/RestoreV2_740/tensor_names, save/RestoreV2_740/shape_and_slices)]]

 

Caused by op 'save/RestoreV2_740', defined at:

 

File "/usr/local/bin/mvNCCompile", line 118, in

 

create_graph(args.network, args.inputnode, args.outputnode, args.outfile, args.nshaves, args.inputsize, args.weights)

 

File "/usr/local/bin/mvNCCompile", line 104, in create_graph

 

net = parse_tensor(args, myriad_config)

 

File "/usr/local/bin/ncsdk/Controllers/TensorFlowParser.py", line 190, in parse_tensor

 

saver = tf.train.import_meta_graph(path)

 

File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 1698, in import_meta_graph

 

**kwargs)

 

File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/meta_graph.py", line 656, in import_scoped_meta_graph

 

producer_op_list=producer_op_list)

 

File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/importer.py", line 313, in import_graph_def

 

op_def=op_def)

 

File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 2630, in create_op

 

original_op=self._default_original_op, op_def=op_def)

 

File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 1204, in init

 

self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

 

NotFoundError (see above for traceback): Unsuccessful TensorSliceReader constructor: Failed to find any matching files for model-20171204-174419

 

[[Node: save/RestoreV2_740 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save/Const_0_0, save/RestoreV2_740/tensor_names, save/RestoreV2_740/shape_and_slices)]]
Tags (1)
0 Kudos
5 Replies
Highlighted
Community Manager
21 Views

I saw the** ncsdk 1.10.1 can support inception-resnet-v2 model with tensorflow.**

 

I trained this model for facenet, got some files for check point in tensorflow, and i want to covert it for NCS.

 

But I get some error, anyone help me to check what worng is?

 

Or is there a example for inception-resnet v2 with NCS?

 

Thanks.

 

My command:

 

$mvNCCompile model-20171204-174419.meta -s 12 -in=input -on=Predictions -is 160 160 -o Inception-resnet-v2.graph
0 Kudos
Highlighted
Community Manager
21 Views

The error is as below:

 

mvNCCompile v02.00, Copyright @ Movidius Ltd 2016

 

/usr/local/lib/python3.5/dist-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() instead

 

if d.decorator_argspec is not None), _inspect.getargspec(target))

 

WARNING:tensorflow:The saved meta_graph is possibly from an older release:

 

 

Caused by op 'save/RestoreV2_740', defined at:

 

File "/usr/local/bin/mvNCCompile", line 118, in

 

create_graph(args.network, args.inputnode, args.outputnode, args.outfile, args.nshaves, args.inputsize, args.weights)

 

File "/usr/local/bin/mvNCCompile", line 104, in create_graph

 

net = parse_tensor(args, myriad_config)

 

File "/usr/local/bin/ncsdk/Controllers/TensorFlowParser.py", line 190, in parse_tensor

 

saver = tf.train.import_meta_graph(path)

 

File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 1698, in import_meta_graph

 

**kwargs)

 

File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/meta_graph.py", line 656, in import_scoped_meta_graph

 

producer_op_list=producer_op_list)

 

File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/importer.py", line 313, in import_graph_def

 

op_def=op_def)

 

File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 2630, in create_op

 

original_op=self._default_original_op, op_def=op_def)

 

File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 1204, in init

 

self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

 

NotFoundError (see above for traceback): Unsuccessful TensorSliceReader constructor: Failed to find any matching files for model-20171204-174419

 

[[Node: save/RestoreV2_740 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save/Const_0_0, save/RestoreV2_740/tensor_names, save/RestoreV2_740/shape_and_slices)]]
0 Kudos
Highlighted
Community Manager
21 Views

Any luck getting this working?

0 Kudos
Highlighted
Community Manager
21 Views

I faced the same error. It was so trivial that it was embarrasing.

 

Just change the name of your meta file such that it ends with 'ckpt.meta', same extension as the checkpoint file
0 Kudos
Highlighted
Community Manager
21 Views

@rouyunpan We have some new sample code with FaceNet @ https://github.com/movidius/ncappzoo.

0 Kudos