Showing results for 
Search instead for 
Did you mean: 
Community Manager

TypeError When Compiling Mobilenet V1 in Tensorflow



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


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"


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/ 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/ 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.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/", 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:


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?



Tags (1)
0 Kudos
2 Replies
Community Manager

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?


Community Manager



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


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?