ikostrikov / pytorch-trpo

PyTorch implementation of Trust Region Policy Optimization
MIT License
433 stars 91 forks source link

what does volatile=True for? #12

Closed dragen1860 closed 6 years ago

dragen1860 commented 6 years ago

Dear author: I found your code very helpful. However, I have problems trying to read the following code:

https://github.com/ikostrikov/pytorch-trpo/blob/eb26e29ed75b7c7b46b0c717331cc7488ab16b8d/main.py#L111

I wonder the usage of volatile flag. I want to when u set volatile to True/False.

ikostrikov commented 6 years ago

I just doesn't compute gradients when one of the inputs is volatile.

But in the new versions of PyTorch it's deprecated.