def to_cpu(self): super(NStepLSTM, self).to_cpu() if self.cx is not None: self.cx.to_cpu() if self.hx is not None: self.hx.to_cpu()