© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Salvador Falcón Canillas
Hi i have an error on the last part of the code,where you predict the next day.
This is the error: ValueError: Input 0 of layer "sequential_1" is incompatible with the layer: expected shape=(None, 60, 1), found shape=(None, 59, 1)
cicada
Seeking
Hi, please try after removing +1 while collecting the real_data. I mean replace below line
real_data = [model_inputs[len(model_inputs) + 1 - prediction_days : len(model_inputs)+1, 0]]
with real_data = [model_inputs[len(model_inputs) - prediction_days : len(model_inputs)+1, 0]]
Let me know if it fixed the issue.