其他分享
首页 > 其他分享> > 2021-10-21

2021-10-21

作者:互联网

使用CNN-LSTM做多变量预测时出现的错误ValueError: Input 0 is incompatible with layer model: expected shape=(None, 5, 4), found shape=(None, 1, 4)

错误原因:
输入的timestepinput_dim设置的为54,而我的数据是1*4,二者不符合.

修改:
将timestep的设置值改为1,因为使用CNN作为输入,所以也需要将maxpooling改为1。
为啥这样做我也不知道,有更了解的大神欢迎评论区解答。

标签:10,None,21,错误,shape,改为,2021,CNN,输入
来源: https://blog.csdn.net/weixin_44885944/article/details/120879618