Hi, @zizi,
I finally managed to find the time to reply to you
I ran your code here:
https://rstudio.cloud/project/162323
I get the error
Error in normalize_shape(input_shape) : object 'look_back' not found
but this is clearly due to the fact that you don't define lookback (used here)
layer_lstm(units = 4,input_shape = c(1, look_back)) %>%#引入LSTM层
anywhere in your code. Can you fix that? Also, can you please rewrite the comments in English (I think they're Standard Chinese now)? That would make it easier for me to follow the code. I think I understand what you're trying to do here (you want to predict output y(t) based on preceding inputs y(t-1), y(t-2), ..., y(t-k) where look_back <- k), but I'd rather be sure than having to guess.
Also, even if I substitute look_back with, say, 4, your code keeps failing because you didn't define your training set anywhere. Please include the training set bit and try again
Also, as a general rule, I'd never train a NN without at the same time validating it on a validation set, but I digress.
EDIT never mind about translating the comments to English. In the end I was able to read all of them
it looks like you work on a drive called "Data Mining"...