dcc34ef8cd1e55fee69eb9f764650fdbab9da18f,softlearning/policies/gmm.py,GMMPolicy,_squash_correction,#GMMPolicy#Any#,159
Before Change
def _squash_correction(self, actions):
if not self._squash: return 0
return tf.reduce_sum(tf.log(1 - tf.tanh(actions) ** 2 + EPS), axis=1)
@contextmanager
def deterministic(self, set_deterministic=True, latent=None):
Context manager for changing the determinism of the policy.
After Change
// return tf.reduce_sum(tf.log(1 - tf.tanh(actions) **2 + EPS), axis=1)
// numerically stable squash correction without bias from EPS
return tf.reduce_sum(2. * (tf.log(2.) - actions - tf.nn.softplus(-2. * actions)), axis=1)
@contextmanager
def deterministic(self, set_deterministic=True, latent=None):
Context manager for changing the determinism of the policy.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 17
Instances
Project Name: rail-berkeley/softlearning
Commit Name: dcc34ef8cd1e55fee69eb9f764650fdbab9da18f
Time: 2018-07-18
Author: azhou42@berkeley.edu
File Name: softlearning/policies/gmm.py
Class Name: GMMPolicy
Method Name: _squash_correction
Project Name: rail-berkeley/softlearning
Commit Name: 606f9cae4027b7e017d92f74ed58a116aaf59c4f
Time: 2018-07-09
Author: azhou42@berkeley.edu
File Name: softlearning/policies/latent_space_policy.py
Class Name: LatentSpacePolicy
Method Name: _squash_correction
Project Name: rail-berkeley/softlearning
Commit Name: dcc34ef8cd1e55fee69eb9f764650fdbab9da18f
Time: 2018-07-18
Author: azhou42@berkeley.edu
File Name: softlearning/policies/gmm.py
Class Name: GMMPolicy
Method Name: _squash_correction
Project Name: rail-berkeley/softlearning
Commit Name: e952b7de4986b9329c8e7b6993acc0f865b4235f
Time: 2018-07-05
Author: azhou42@berkeley.edu
File Name: softlearning/policies/gaussian_policy.py
Class Name: GaussianPolicy
Method Name: _squash_correction