From d39197c555356a793e8a2e018732497cb830e3a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quentin=20Gallou=C3=A9dec?= <45557362+qgallouedec@users.noreply.github.com> Date: Tue, 29 Nov 2022 13:10:54 +0100 Subject: [PATCH] Remove useless entropy testing --- tests/test_distributions.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_distributions.py b/tests/test_distributions.py index e782182..9c26fef 100644 --- a/tests/test_distributions.py +++ b/tests/test_distributions.py @@ -78,7 +78,6 @@ def test_get_distribution(dummy_model_distribution_obs_and_actions): log_prob_2 = distribution.log_prob(actions) entropy_2 = distribution.entropy() assert entropy_1 is not None - assert entropy_2 is not None assert th.allclose(log_prob_1, log_prob_2) assert th.allclose(entropy_1, entropy_2) @@ -230,3 +229,6 @@ def test_kl_divergence(dist_type): ) assert th.allclose(full_kl_div, ad_hoc_kl) +test_kl_divergence(StateDependentNoiseDistribution(N_ACTIONS).proba_distribution( + th.rand(N_ACTIONS), th.rand([N_ACTIONS, N_ACTIONS]), th.rand([N_ACTIONS, N_ACTIONS]) + )) \ No newline at end of file