mirror of
https://github.com/vale981/ray
synced 2025-03-06 18:41:40 -05:00
[rllib] Entropy calculation for diag gaussian missing 0.5 term (#2968)
See: https://en.wikipedia.org/wiki/Multivariate_normal_distribution#Entropy
This commit is contained in:
parent
b3f0dcf20b
commit
cb56f39070
1 changed files with 1 additions and 1 deletions
|
@ -125,7 +125,7 @@ class DiagGaussian(ActionDistribution):
|
|||
|
||||
def entropy(self):
|
||||
return tf.reduce_sum(
|
||||
self.log_std + .5 * np.log(2.0 * np.pi * np.e),
|
||||
.5 * self.log_std + .5 * np.log(2.0 * np.pi * np.e),
|
||||
reduction_indices=[1])
|
||||
|
||||
def sample(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue