Keras Error—— ValueError: Can not do batch_dot on inputs with shapes

Keras:

ValueError: Can not do batch_dot on inputs with shapes (None, 10, 10, 1152, 16) and (None, 10, None, 1152, 16) with axes=[2, 3]. x.shape[2] != y.shape[3] (10 != 1152).

将Keras版本降为2.2.4

pip install keras==2.2.4

 

trainX Y shape is: (4755, 48, 23) (4755, 60, 23) (4755, 5, 1) Hx= 1 Traceback (most recent call last): File ~\anaconda4\envs\tensorflow\lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec exec(code, globals, locals) File d:\lstnet_keras-master\train_batch_a391.py:172 model,normalize = startTrainMult_1H(df,name,config) File D:\lstnet_keras-master\lstm\LSTNet_Interface_a391.py:400 in startTrainMult_1H model = trainModel(trainX1, trainX2 , trainY, config) File D:\lstnet_keras-master\lstm\LSTNet_Interface_a391.py:323 in trainModel model = LSTNetAttention(trainX1,trainX2,trainY,config) File D:\lstnet_keras-master\lstm\LSTNet_Interface_a391.py:297 in LSTNetAttention res = add([concat,z]) File ~\anaconda4\envs\tensorflow\lib\site-packages\keras\layers\merge.py:555 in add return Add(**kwargs)(inputs) File ~\anaconda4\envs\tensorflow\lib\site-packages\keras\backend\tensorflow_backend.py:75 in symbolic_fn_wrapper return func(*args, **kwargs) File ~\anaconda4\envs\tensorflow\lib\site-packages\keras\engine\base_layer.py:463 in __call__ self.build(unpack_singleton(input_shapes)) File ~\anaconda4\envs\tensorflow\lib\site-packages\keras\layers\merge.py:90 in build output_shape = self._compute_elemwise_op_output_shape(output_shape, File ~\anaconda4\envs\tensorflow\lib\site-packages\keras\layers\merge.py:59 in _compute_elemwise_op_output_shape raise ValueError('Operands could not be broadcast ' ValueError: Operands could not be broadcast together with shapes (23, 32) (5,)
最新发布
06-01
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
>