jwdink:

self.log_process_std = torch.log( torch.exp(self.log_obs_std) * torch.exp(self.log_ratio) )


PyTorch uses dynamic graph. It’s not symbolic expression as tf is. You are backproping via this graph multiple times. Manually compute at each iteration please.