My code is as following:

QQ图片20180117121139.png694×582 12.2 KB


QQ图片20180117121144.png704×593 13.5 KB

The first image is generator(G) and the second is discriminator(D). I want use G  to generate data for every time step and use D to classify the real data and the generated data. I’m not sure whether I code correctly or not. And I don’t know  about the red underline section why  ‘lstm_out[-1]’ in D and ‘lstm_out’ in G?