---
title: "Comment by Salvador Falcón Canillas on \"Share Price Prediction using Python & Recurrent Neural Nets\" | Hashnode"
description: "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 &quot;sequential_1&quot; is inco"
url: "https://hashnode.com/posts/share-price-prediction-using-python-and-recurrent-neural-nets/60d72149de92ef110afddc88/comment/61ca42db5e8b9423aa068178"
---

[Discussion](https://hashnode.com/posts/share-price-prediction-using-python-and-recurrent-neural-nets/60d72149de92ef110afddc88)

Comment [Share Price Prediction using Python & Recurrent Neural Nets](https://hashnode.com/posts/share-price-prediction-using-python-and-recurrent-neural-nets/60d72149de92ef110afddc88)

[Salvador Falcón Canillas](https://hashnode.com/@Cooketaker)

[Dec 27, 2021](https://hashnode.com/posts/share-price-prediction-using-python-and-recurrent-neural-nets/60d72149de92ef110afddc88/comment/61ca42db5e8b9423aa068178)

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](https://hashnode.com/@cicada)

[Jan 7, 2022](https://hashnode.com/posts/share-price-prediction-using-python-and-recurrent-neural-nets/60d72149de92ef110afddc88/comment/61ca42db5e8b9423aa068178#reply-61d81ae54b84101d2c3ede97)

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.
