How to implement recursive neural networks in Tensorflow?

走远了吗. 提交于 2021-02-05 12:22:31

问题


I am trying to implement a very basic recursive neural network into my linear regression analysis project in Tensorflow that takes two inputs passed to it and then a third value of what it previously calculated.

So, my project is trying to calculate something across the next x number of years, and after the first year I want it to keep taking the value of the last year.

Currently, my training data has two inputs, not three, predicting one output, so how could I make it recursive, so it keeps on passing in the value from the last year, to calculate the next?

To explain slightly further, if it were to calculate across the next 5 years:

1st year:
Input 1: 10
Input 2: 20
(Maybe need input 3, but a value that has no affect on the linear regression model)
Output: 30
2nd year:
Input 1: 11
Input 2: 22
Input 3: 30 (1st year output)
Output: 35
3rd Year:
Input 1:12
Input 2: 24
Input 3: 35 (2nd year output)
Output: 40

来源:https://stackoverflow.com/questions/65762935/how-to-implement-recursive-neural-networks-in-tensorflow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!