---
title: "Discussion on \"Share Price Prediction using Python & Recurrent Neural Nets\" | Hashnode"
description: "Discussion on \"Share Price Prediction using Python & Recurrent Neural Nets\". Machine learning has significant applications in the stock price prediction. In this machine learning project, we are going to build an AI neural network model to predict stock prices. Specifically, we will work with the Facebook's stock.\nWe will use..."
url: "https://hashnode.com/posts/share-price-prediction-using-python-and-recurrent-neural-nets/60d72149de92ef110afddc88"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Share Price Prediction using Python & Recurrent Neural Nets](https://chinmayblog.cnresearchs.in/share-price-prediction-using-python-and-recurrent-neural-nets?utm_source=hashnode&utm_medium=feed)

Machine learning has significant applications in the stock price prediction. In this machine learning project, we are going to build an AI neural network model to predict stock prices. Specifically, we will work with the Facebook's stock. We will use...

Jun 26, 2021 · 4 min read · chinmayblog.cnresearchs.in  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#machine-learning](https://hashnode.com/tag/machine-learning)

## Written by

[cicada](https://hashnode.com/@cicada)

@cicada · India

  
[View profile](https://hashnode.com/@cicada)

Seeking

Hi! 👋 I'm Cicada(my digital name), welcome to my blog! I’m a Software Engineer based in India. I have 8+ years of professional experience, 4 of them working with Database, 3 of them as DevOps engineer and 1+ as Automation/ML Eng. Over these years, I’ve been developing and releasing different software and tools. I write about Machine Learning/AI, but anything related to my area of expertise is a great candidate for a tutorial. I’m interested in Machine Learning/AI and Python.

## Responses 2

Markdown supported · ⌘↵ to post

[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.

[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/61ca2cc35e8b9423aa068041)

Hi i think your code is pretty interesting to testing , but i have the next error:

How could i fix it?

ValueError: Input 0 of layer "sequential\_1" is incompatible with the layer: expected shape=(None, 60, 1), found shape=(None, 59, 1)
