Hello,
I am trying to train a RNN model without teacher forcing, where the input in an encoder image. The input to the RNN is a FC-layer.
#initialize hidden
#run rnn one step at a time
for step in range(nsteps):
output, hidden = RNN(input,hidden)
#project output to same size as input
proj = projection_layer(output)
input = Variable(proj.data, requires_grad=True)
Q. Is this correct? do i need to wrap ‘proj.data’ like above. If I just do input = proj, I am guessing the gradients will accumulate which is not desirable.
Thanks