But packed_actions and packed_actions_gt are PackedSequence objects, how can I compute a loss on them?
Right now there is no syntax error, and model seems to be able to train a little bit. I originally thought that packed_actions.data only access the data field of PackedSequence, and packed_actions.data.data will detach the tensor from the graph.
If packed_actions.data will detach the wrapped tensor, my approach outlined above will not work. Is there a way to access the tensors that PackedSequence holds while leave the tensors in the computation graph?
Thank you!