yunjey / pytorch-tutorial

PyTorch Tutorial for Deep Learning Researchers
MIT License
29.54k stars 8k forks source link

Using LSTM method in Python #222

Open LZJ30 opened 3 years ago

LZJ30 commented 3 years ago

There are something wrong with my codes. ValueError: non-broadcastable output operand with shape (2416,1) doesnt match the broadcast shape (2416,24) How can I figure it out? Here is a short code where occurs mistake.

测试集输入模型进行预测

predicted_Traffic_flow = model.predict(x_test)

对预测数据还原---从(0,1)反归一化到原始范围

predicted_Traffic_flow = sc.inverse_transform(predicted_Traffic_flow)