diff --git a/sandbox/rocky/tf/distributions/diagonal_gaussian.py b/sandbox/rocky/tf/distributions/diagonal_gaussian.py index d8ac41361..22835aba9 100644 --- a/sandbox/rocky/tf/distributions/diagonal_gaussian.py +++ b/sandbox/rocky/tf/distributions/diagonal_gaussian.py @@ -92,6 +92,10 @@ def entropy(self, dist_info): log_stds = dist_info["log_std"] return np.sum(log_stds + np.log(np.sqrt(2 * np.pi * np.e)), axis=-1) + def entropy_sym(self, dist_info_var): + log_std_var = dist_info_var["log_std"] + return tf.reduce_sum(log_std_var + np.log(np.sqrt(2 * np.pi * np.e)), axis=-1) + @property def dist_info_specs(self): return [("mean", (self.dim,)), ("log_std", (self.dim,))]