2017-05-10 1 views
-1

です:とValueError:シェイプ(2、1)とは、()私は<a href="https://github.com/lmb-freiburg/hand3d" rel="nofollow noreferrer">this code repo</a>ためTensorflow 0.11を使用する必要があり、これは私が取得エラーです互換性のない

(py35) E:\opensource_codes\gesture_recognition\hand3d-master>python run.py 
Traceback (most recent call last): 
    File "run.py", line 47, in <module> 
    keypoints_scoremap_tf, keypoint_coord3d_tf = net.inference(image_tf, hand_side_tf, evaluation) 
    File "E:\opensource_codes\gesture_recognition\hand3d-master\net.py", line 37, in inference 
    hand_mask = single_obj_scoremap(hand_scoremap) 
    File "E:\opensource_codes\gesture_recognition\hand3d-master\utils.py", line 246, in single_obj_scoremap 
    max_loc = find_max_location(scoremap_fg) 
    File "E:\opensource_codes\gesture_recognition\hand3d-master\utils.py", line 228, in find_max_location 
    xy_loc.append(tf.concat(0, [x_loc, y_loc])) 
    File "C:\Users\mona6\AppData\Local\conda\conda\envs\py35\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1030, in concat 
    ).assert_is_compatible_with(tensor_shape.scalar()) 
    File "C:\Users\mona6\AppData\Local\conda\conda\envs\py35\lib\site-packages\tensorflow\python\framework\tensor_shape.py", line 735, in assert_is_compatible_with 
    raise ValueError("Shapes %s and %s are incompatible" % (self, other)) 
ValueError: Shapes (2, 1) and() are incompatible 

(py35) E:\opensource_codes\gesture_recognition\hand3d-master>python 
Python 3.5.3 |Continuum Analytics, Inc.| (default, Feb 22 2017, 21:28:42) [MSC v.1900 64 bit (AMD64)] on win32 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import tensorflow as tf 
>>> tf.__version__ 
'1.1.0' 
>>> 

修正を提案してください。

エラーは、私は私が、私はそうしましたTensorflowの同じ正確な転覆を持っているが、それでも上記のエラーを取得していることを確認したかったラインxy_loc.append(tf.concat(0, [x_loc, y_loc]))

に由来すると思われます。 tensorflow 0.12とコードをインストール

(py35) E:\opensource_codes\gesture_recognition\hand3d-master>pip install tensorflow==1.1.0rc0 
Collecting tensorflow==1.1.0rc0 
    Using cached tensorflow-1.1.0rc0-cp35-cp35m-win_amd64.whl 
Requirement already satisfied: protobuf>=3.2.0 in c:\users\mona6\appdata\local\conda\conda\envs\py35\lib\site-packages (from tensorflow==1.1.0rc0) 
Requirement already satisfied: six>=1.10.0 in c:\users\mona6\appdata\local\conda\conda\envs\py35\lib\site-packages (from tensorflow==1.1.0rc0) 
Requirement already satisfied: werkzeug>=0.11.10 in c:\users\mona6\appdata\local\conda\conda\envs\py35\lib\site-packages (from tensorflow==1.1.0rc0) 
Requirement already satisfied: wheel>=0.26 in c:\users\mona6\appdata\local\conda\conda\envs\py35\lib\site-packages (from tensorflow==1.1.0rc0) 
Requirement already satisfied: numpy>=1.11.0 in c:\users\mona6\appdata\local\conda\conda\envs\py35\lib\site-packages (from tensorflow==1.1.0rc0) 
Requirement already satisfied: setuptools in c:\users\mona6\appdata\local\conda\conda\envs\py35\lib\site-packages (from protobuf>=3.2.0->tensorflow==1.1.0rc0) 
Requirement already satisfied: appdirs>=1.4.0 in c:\users\mona6\appdata\local\conda\conda\envs\py35\lib\site-packages (from setuptools->protobuf>=3.2.0->tensorflow==1.1.0rc0) 
Requirement already satisfied: packaging>=16.8 in c:\users\mona6\appdata\local\conda\conda\envs\py35\lib\site-packages (from setuptools->protobuf>=3.2.0->tensorflow==1.1.0rc0) 
Requirement already satisfied: pyparsing in c:\users\mona6\appdata\local\conda\conda\envs\py35\lib\site-packages (from packaging>=16.8->setuptools->protobuf>=3.2.0->tensorflow==1.1.0rc0) 
Installing collected packages: tensorflow 
    Found existing installation: tensorflow 1.1.0 
    Uninstalling tensorflow-1.1.0: 
     Successfully uninstalled tensorflow-1.1.0 
Successfully installed tensorflow-1.1.0rc0 
+1

ないリンクを介して、*質問に** [MCVE] ** *記載してください。 –

+0

@aryamccarthy私はgit repoの命令に従い、コードを変更せず、実行したときに上記のエラーが発生しました。なぜあなたがそれを閉じようとしているのか分かりません。 –

+3

リンクされたコードが* minimal *ではないためです。 –

答えて

0

は変更せずに完璧に働いた: enter image description here

(py35) E:\opensource_codes\gesture_recognition\hand3d-master>pip install tensorflow==1.2.0 
Collecting tensorflow==1.2.0 
    Could not find a version that satisfies the requirement tensorflow==1.2.0 (from versions: 0.12.0rc0, 0.12.0rc1, 0.12.0, 0.12.1, 1.0.0, 1.0.1, 1.1.0rc0, 1.1.0rc1, 1.1.0rc2, 1.1.0) 
No matching distribution found for tensorflow==1.2.0 

(py35) E:\opensource_codes\gesture_recognition\hand3d-master>pip install tensorflow==0.12.1 
Collecting tensorflow==0.12.1 
    Downloading tensorflow-0.12.1-cp35-cp35m-win_amd64.whl (13.7MB) 
    100% |################################| 13.8MB 130kB/s 
Requirement already satisfied: numpy>=1.11.0 in c:\users\mona6\appdata\local\conda\conda\envs\py35\lib\site-packages (from tensorflow==0.12.1) 
Requirement already satisfied: protobuf>=3.1.0 in c:\users\mona6\appdata\local\conda\conda\envs\py35\lib\site-packages (from tensorflow==0.12.1) 
Requirement already satisfied: six>=1.10.0 in c:\users\mona6\appdata\local\conda\conda\envs\py35\lib\site-packages (from tensorflow==0.12.1) 
Requirement already satisfied: wheel>=0.26 in c:\users\mona6\appdata\local\conda\conda\envs\py35\lib\site-packages (from tensorflow==0.12.1) 
Requirement already satisfied: setuptools in c:\users\mona6\appdata\local\conda\conda\envs\py35\lib\site-packages (from protobuf>=3.1.0->tensorflow==0.12.1) 
Requirement already satisfied: packaging>=16.8 in c:\users\mona6\appdata\local\conda\conda\envs\py35\lib\site-packages (from setuptools->protobuf>=3.1.0->tensorflow==0.12.1) 
Requirement already satisfied: appdirs>=1.4.0 in c:\users\mona6\appdata\local\conda\conda\envs\py35\lib\site-packages (from setuptools->protobuf>=3.1.0->tensorflow==0.12.1) 
Requirement already satisfied: pyparsing in c:\users\mona6\appdata\local\conda\conda\envs\py35\lib\site-packages (from packaging>=16.8->setuptools->protobuf>=3.1.0->tensorflow==0.12.1) 
Installing collected packages: tensorflow 
    Found existing installation: tensorflow 1.1.0rc0 
    Uninstalling tensorflow-1.1.0rc0: 
     Successfully uninstalled tensorflow-1.1.0rc0 
Successfully installed tensorflow-0.12.1 

(py35) E:\opensource_codes\gesture_recognition\hand3d-master>python run.py 
関連する問題

 関連する問題