Hi Zheng Chen, did you manage to solve this issue? I’m running in similar problems when calling

self.gru.flatten_parameters()

The error occurs at inference while executing all code within

with torch.no_grad():