31921


<http://qiita.com/t_shinmura/items/066b696d82f9919480ae>  
上のページの  
<https://github.com/TakuyaShinmura/conv_lstm>  
にあるソースコードのtrain.pyをそのまま実行した結果、

[code]

    WARNING:tensorflow:<conv_lstm_cell.ConvLSTMCell object at 0x7f3797af4be0>: Using a concatenated state is slower and will soon be deprecated.  Use state_is_tuple=True.
    Traceback (most recent call last):
      File "/home/user/anaconda3/envs/tensorflow/lib/python3.5/site-packages/tensorflow/python/framework/tensor_shape.py", line 563, in merge_with
        self.assert_same_rank(other)
      File "/home/user/anaconda3/envs/tensorflow/lib/python3.5/site-packages/tensorflow/python/framework/tensor_shape.py", line 609, in assert_same_rank
        "Shapes %s and %s must have the same rank" % (self, other))
    ValueError: Shapes (?, 64, 64, 3) and (?, ?) must have the same rank
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/user/anaconda3/envs/tensorflow/lib/python3.5/site-packages/tensorflow/python/framework/tensor_shape.py", line 639, in with_rank
        return self.merge_with(unknown_shape(ndims=rank))
      File "/home/user/anaconda3/envs/tensorflow/lib/python3.5/site-packages/tensorflow/python/framework/tensor_shape.py", line 570, in merge_with
        (self, other))
    ValueError: Shapes (?, 64, 64, 3) and (?, ?) are not compatible
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "train.py", line 137, in <module>
        tf.app.run()
      File "/home/user/anaconda3/envs/tensorflow/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 30, in run
        sys.exit(main(sys.argv))
      File "train.py", line 78, in main
        result = inference(images)
      File "train.py", line 43, in inference
        outputs, state = tf.nn.rnn(cell=cell, inputs=images, dtype=tf.float32)
      File "/home/user/anaconda3/envs/tensorflow/lib/python3.5/site-packages/tensorflow/python/ops/rnn.py", line 113, in rnn
        (fixed_batch_size, input_size) = inputs[0].get_shape().with_rank(2)
      File "/home/user/anaconda3/envs/tensorflow/lib/python3.5/site-packages/tensorflow/python/framework/tensor_shape.py", line 641, in with_rank
        raise ValueError("Shape %s must have rank %d" % (self, rank))
    ValueError: Shape (?, 64, 64, 3) must have rank 2
    
[/code]

とエラーが出ましたが、原因がわかりません。  
何故このようなエラーが出るのか教えてくださると助かります。


CC BY-SA 3.0
2017-01-16T13:23:56.530
31890
2017-01-17T18:07:08.110
2017-01-16T13:40:26.953
8000
20244
question
python tensorflow
ValueError: Shape (?, 64, 64, 3) must have rank 2


コメントの指摘から、バージョンを変更した結果解決しました。ありがとうございました。


CC BY-SA 3.0
2017-01-17T18:07:08.110
31921
2017-01-17T18:07:08.110
20244
31890
answer