My original plan was this: I want to use the Encoder-Decoder neural network to predict the next characters in each batch. I’m storing the neural network outputs in the variable Y_hat. Since for the decoder input (dec_input) I need to concatenate bos (beginning of sequence tokens) and Y_hat and I don’t yet have Y_hat (since I need to run the inputs through the neural network first), I first randomly fill up Y_hat and then for each subsequent batch Y_hat is what it was from the previous batch.
Writing this out, it doesn’t make much sense because Y_hat should be the prediction of the neural network on the characters of this batch, not the previous one. However, I have to concatenate beginning of sequence tokens (bos) with Y_hat prior to passing the characters to the neural network. How can I accomplish this?