title: Tensorflow: How to pass output from previous time-step as input to next timestep
body: <p>It is a duplicate of this question <a href="https://stackoverflow.com/questions/35145645/how-can-i-feed-last-output-yt-1-as-input-for-generating-yt-in-tensorflow-rnn#">How can I feed last output y(t-1) as input for generating y(t) in tensorflow RNN?</a></p>
  
  <p>I want to pass the output of RNN at time-step T as the input at time-step T+1. <code>input_RNN(T+1) = output_RNN(T)</code>
  As per the documentation, the  tf.nn.rnn as well as tf.nn.dynamic_rnn functions explicitly take the complete input to all time-steps. </p>
  
  <p>I checked the seq2seq example at <a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/ops/seq2seq.py" rel="noreferrer">https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/ops/seq2seq.py</a>
  It uses a loop and calls the cell(input,state) function. The cell can be lstm or gru or any other rnn cell. I checked the documentation to find the data type and shape of the arguments to cell(), but I found only the contructor of the form cell(num_neurons). 
  I would like to know the correct way of passing output to input. I don't want to use other libraries/wrappers like keras built over tensorflow. Any suggestions?</p>