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

TypeError When Compiling Mobilenet V1 in Tensorflow

Hi,

 

I am working on deploying a modified version of Openpose library (pose estimation) from Github

 

https://github.com/ildoonet/tf-pose-estimation

 

The author migrated the original pose estimation from Caffe into Tensorflow, and export his model. I am compiling the .pd model under "./models/graph/mobilenet_thin/graph_opt.pb"

 

https://github.com/ildoonet/tf-pose-estimation/tree/master/models/graph/mobilenet_thin

 

but got a Type-error like below. (with virtualbox and Ubuntu 16.04, NCSDK v1)

 

 

tcwei@tcwei-VirtualBox:~/workspace/tfpose_test/models/graph/mobilenet_thin$ mvNCCompile graph_opt.pb -s 12 -in image -on Openpose/concat_stage7 -o graph_opt.graph

 

mvNCCompile v02.00, Copyright @ Movidius Ltd 2016

 

/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py:766: DeprecationWarning: builtin type EagerTensor has no module attribute

 

EagerTensor = c_api.TFE_Py_InitEagerTensor(_EagerTensorBase)

 

/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))

 

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 259, in parse_tensor

 

input_data = np.random.uniform(0, 1, shape)

 

File "mtrand.pyx", line 1302, in mtrand.RandomState.uniform

 

File "mtrand.pyx", line 242, in mtrand.cont2_array_sc

 

TypeError: 'NoneType' object cannot be interpreted as an integer

 

 

I checked some other discussions. It seems that most of time, the TypeError comes up with a unsupported issue and NCSDK doesn't support SSD-mobilenet. However, I am not sure if the model is using mobilenet v1 or SSD-mobilenet.

 

Also, through Tensorboard visualization as below:

 

https://imgur.com/a/RCqsEbN

 

I found that the model file includes mobilenet-V1 namescope and Openpose namescope. Would the other libraries/architectures like Openpose in my situation result in compiling failed? How to solve the problem?

 

Thanks.

Tags (1)
0 Kudos
2 Replies
Highlighted
Community Manager
15 Views

I tried some simple architectures with my own layers and compiled them successfully. Hence, I am sure NCSDK supports customized architectures if they are successfully parsed. Just don't know which part of this tf-openpose library could result in compilation failed. Could anyone give us a suggestion?

 

Thanks.
0 Kudos
Highlighted
Community Manager
15 Views

Hi,

 

I found that "if statements" in the file of /usr/local/bin/ncsdk/Controllers/TensorFlowParser.py

 

For example:

 

"if shape.dims is None"

 

"if input_shape.dims is None"

 

For my graph input: (?, ?, ?, 3),

 

[Dimension(None), Dimension(None), Dimension(None), Dimension(3)]

 

Although element [0][1][2] are all None, the statements always return False and skip the value assigning inside the statement.

 

Therefore, the problem happens when it calls to acquire the value and find None_type.

 

Also, I am not sure if these can help me resolve the whole issue.

 

Could anyone help me for that?
0 Kudos