Hi Shengwei,
Thank you for the answer. But I think the method of creating an extra c_detach variable is only work for this simple case. For Pytorch built in nn.RNN, we can’t do this to hidden states unless we build the structure from scratch.