lstm时间预测输入问题
ghfg957 发布于2020-06 浏览:2555 回复:1
0
收藏

使用lstm做时间序列预测时,我的数据得timestep为50,每个样例的特征是6维,在数据定义时fluid.layers.data(name='x', shape=[1], dtype='float32', lod_level=1),我想根据这个序列数据预测一个类别,因此标签定义为fluid.layers.data(name='y', shape=[1], dtype='int64') , 但是提示错误

InvalidArgumentError: After flatten the input tensor X and Y to 2-D dimensions matrix X1 and Y1, the matrix X1's width must be equal with matrix Y1's height. But received X's shape = [25600, 6], X1's shape = [25600, 6], X1's width = 6; Y's shape = [1, 200], Y1's shape = [1, 200], Y1's height = 1.
[Hint: Expected x_mat_dims[1] == y_mat_dims[0], but received x_mat_dims[1]:6 != y_mat_dims[0]:1.] at (/paddle/paddle/fluid/operators/mul_op.cc:83)

我得batch_size设置的是512,想请问是哪有问题?

收藏
点赞
0
个赞
共1条回复 最后由591Austin回复于2022-12
#2591Austin回复于2022-12

删除模型, 重新训练

1
TOP
切换版块