Skip to content

Commit

Permalink
Remove outdated unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
emailweixu committed May 7, 2024
1 parent 303a9a3 commit 5c6af18
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions alf/algorithms/actor_critic_loss_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,9 @@
import torch.distributions as td
import numpy as np

from alf.algorithms.actor_critic_loss import _normalize_advantages
from alf.utils.dist_utils import compute_entropy, compute_log_probability


class TestAdvantageNormalization(unittest.TestCase):
def test_advantage_normalization(self):
advantages = torch.Tensor([[1, 2], [3, 4.0]])
# results computed from tf
normalized_advantages_expected = torch.Tensor(
[[-1.3416407, -0.4472136], [0.4472136, 1.3416407]])
normalized_advantages_obtained = _normalize_advantages(advantages)
np.testing.assert_array_almost_equal(normalized_advantages_obtained,
normalized_advantages_expected)


class TestEntropyExpand(unittest.TestCase):
def test_entropy(self):
m = td.categorical.Categorical(torch.Tensor([0.25, 0.75]))
Expand Down

0 comments on commit 5c6af18

Please sign in to comment.