Thank you, I got the same problem and your tip worked for me. However, I don’t know what the root cause is.
In my case,
def forward(self, inputs, hidden):
...
     emb_to_hidden = self.first_hidden(embedded_inputs[timestep])
     previous_to_hidden = self.last_time_hiddens[0](hidden[0])
     hidden[0] = emb_to_hidden + previous_to_hidden //this line causes error
...
     return outputs, hidden

Why is the operator to re-assign hidden[0] considered as an inplace operation?