Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use stable implementation of tanh's inverse log determinant Jacobian #37

Closed
alexlee-gk opened this issue Mar 23, 2019 · 1 comment
Closed

Comments

@alexlee-gk
Copy link

Replace the second term from https://github.com/vitchyr/rlkit/blob/master/rlkit/torch/distributions.py#L43-L44 with the equation from
https://github.com/tensorflow/probability/blob/master/tensorflow_probability/python/bijectors/tanh.py#L73 .

That is, replace torch.log(1 - value * value + self.epsilon with 2. * (log(2.) - pre_tanh_value - softplus(-2. * pre_tanh_value)).

@vitchyr
Copy link
Collaborator

vitchyr commented Apr 4, 2019

Implemented in c1e9ec6.

@vitchyr vitchyr closed this as completed Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants