July 2019
Intermediate to advanced
512 pages
19h 39m
English
Start the TensorFlow session and initialize all the variables:
sess = tf.Session()init = tf.global_variables_initializer()sess.run(init)
Now, we will look at how to generate the song lyrics using an RNN. What should the input and output to the RNN? How does it learn? What is the training data? Let's understand this an explanation, along with the code, step by step.
We know that in RNNs, the output predicted at a time step
will be sent as the input to the next time step; that is, on every time step, we need to feed the predicted character from the previous time step as input. So, we prepare our dataset in the same way. ...
Read now
Unlock full access