lmb-freiburg / hand3d

Network estimating 3D Handpose from single color images
GNU General Public License v2.0
802 stars 252 forks source link

ValueError: Shapes (2, 1) and () are incompatible #2

Closed heikog closed 7 years ago

heikog commented 7 years ago

I wanted to play around with your work but im getting the above error when executing run.py annysuggestions ? Its TF 1.1 tia

zimmerm commented 7 years ago

The problems you are experiencing are due to changes that were made to the Tensorflow API. Starting with TF 1.0 they renamed and changed the interface of some functions.

I was able to get it working on my machine with the following changes: Change the order of arguments for all calls of tf.concat from "tf.concat(axis, [i1, i2])" to "tf.concat([i1, i2], axis)". Add the following lines to "utils.py" after the import statements:

tf.pack = tf.stack
tf.select = tf.where
tf.batch_matmul = tf.matmul

Or maybe its easier for you to use the TF version mentioned here.

As soon as I find time I'll upgrade the code in repository to be compatible with the current release of Tensorflow.

heikog commented 7 years ago

Thanks for your quick reply. Ill give it a shot

Revin-yu commented 4 years ago

I have the same problem, can you help me solve it? ValueError: Shapes (3, 3, 3, 64) and (64, 1, 3, 3) are incompatible