KFrank
(K. Frank)
2
Hi Jun!
Assigning into a tensor using indexing is an inplace operation, and this
is likely the cause of your error.
Try replacing the code I quoted with
h_0 = self.gru_0(x, h_in[0])
h_out = torch.stack (h_0, self.gru_1(h_0, h_in[1])
If that doesn’t fix your problem, take a look at this post that gives some
suggestions for debugging inplace-modification errors:
Best.
K. Frank