Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6574 Discussions

InvalidArgumentError (see above for traceback): Shape [-1,10] has negative dimensions

idata
Employee
1,951 Views

Hi ,everyone! I encountered a problem. The following tensorflow code are from my training cnn code of mnist data.

 

num_input = 784

 

num_classes = 10

 

dropout = 0.75

 

X = tf.placeholder("float",[None,num_input],name="input")

 

Y = tf.placeholder("float",[256,num_classes],name="output")

 

keep_prob = tf.placeholder("float")

 

but when I use command mvNCCompile, mvNCCompile ckpt_555/model.ckpt.meta -s 12 -in=input -on=output -is 28 28 -o mnist_model.graph

 

there are some errors:

 

InvalidArgumentError (see above for traceback): Shape [-1,10] has negative dimensions

 

[[Node: output = Placeholder[dtype=DT_FLOAT, shape=[?,10], _device="/job:localhost/replica:0/task:0/cpu:0"]()]]

 

Can aynone help to tell me how to solve this problem.

0 Kudos
7 Replies
idata
Employee
1,557 Views

@guohua24 Please try the solution I mentioned at https://ncsforum.movidius.com/discussion/comment/1557/#Comment_1557 and let me know if this solves your issue.

0 Kudos
idata
Employee
1,557 Views

thanks a lot!

0 Kudos
idata
Employee
1,557 Views

@guohua24 You're welcomed!

0 Kudos
idata
Employee
1,557 Views

@Tome_at_Intel

 

Please help me to solve the following problem.

 

when I use the following command: mvNCCompile tcs_inference.meta -w tcs_inference -s 12 -in input -on output -o tsc_inference.graph

 

the output is: 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))

 

/usr/local/bin/ncsdk/Controllers/FileIO.py:52: UserWarning: You are using a large type. Consider reducing your data sizes for best performance

 

"Consider reducing your data sizes for best performance\033[0m")
0 Kudos
idata
Employee
1,557 Views

@guohua24 I'd love to help you but I'm not sure what the problem is. It looks like part of your log may be cut off/missing.

0 Kudos
idata
Employee
1,557 Views

@Tome_at_Intel

 

my WeChat 13910875471. Can We communicate with WeChat?
0 Kudos
idata
Employee
1,557 Views

@guohua24 If you are concerned about the warning You are using a large type. Consider reducing your data sizes for best performance, I want you to know that it is an outdated warning and should be removed soon. This message shows up if you are using 32 bit data in your model, but since the weights for the model are always converted to fp16, you should not be worried about any performance issues.

0 Kudos
Reply