mirror of
https://github.com/vale981/ray
synced 2025-03-08 19:41:38 -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):
|
def entropy(self):
|
||||||
return tf.reduce_sum(
|
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])
|
reduction_indices=[1])
|
||||||
|
|
||||||
def sample(self):
|
def sample(self):
|
||||||
|
|
Loading…
Add table
Reference in a new issue