DDPG-Keras-Torcs
DDPG-Keras-Torcs copied to clipboard
ValueError: Shapes (3, ?, 1) and () are incompatible
I'm getting this error when I run ddpg.py:
Traceback (most recent call last):
File "ddpg.py", line 162, in
File "/home/marmesto/DDPG-Keras-Torcs/ActorNetwork.py", line 54, in create_actor_network
V = merge([Steering,Acceleration,Brake],mode='concat')
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 1528, in merge
name=name)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 1188, in init
self.add_inbound_node(layers, node_indices, tensor_indices)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 572, in add_inbound_node
Node.create_node(self, inbound_layers, node_indices, tensor_indices)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 154, in create_node
output_tensors = to_list(outbound_layer.call(input_tensors, mask=input_masks))
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 1275, in call
return K.concatenate(inputs, axis=self.concat_axis)
File "/usr/local/lib/python2.7/dist-packages/keras/backend/tensorflow_backend.py", line 716, in concatenate
return tf.concat(axis, [to_dense(x) for x in tensors])
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/dispatch.py", line 180, in wrapper
return target(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 1297, in concat
tensor_shape.scalar())
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_shape.py", line 1103, in assert_is_compatible_with
raise ValueError("Shapes %s and %s are incompatible" % (self, other))
ValueError: Shapes (3, ?, 1) and () are incompatible
i have this problem before, it seems the tensorflow version is not compatable, then i change the tensorflow to 0.12, then it fixed.
I have this problem ,and my tensorflow is 1.12.0. can you tell me your tensorflow(0.12?)Specific version ?or how to solve it?thanks!
@legobill you can run:
pip install tensorflow==0.12
谢谢,已经搞定了
------------------ 原始邮件 ------------------ 发件人: "Carl Hildebrandt"<[email protected]>; 发送时间: 2020年2月14日(星期五) 凌晨1:43 收件人: "yanpanlau/DDPG-Keras-Torcs"<[email protected]>; 抄送: "花花世界.个人自由自在"<[email protected]>; "Mention"<[email protected]>; 主题: Re: [yanpanlau/DDPG-Keras-Torcs] ValueError: Shapes (3, ?, 1) and () are incompatible (#61)
@legobill you can run:
pip install tensorflow==0.12
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.