Esempio n. 1
0
 def test_replay_balanced_memory(self):
     mem_size = 25
     policies = [None,
                 ExperienceBalancedStoragePolicy({}, mem_size=mem_size),
                 ClassBalancedStoragePolicy({}, mem_size=mem_size)]
     for policy in policies:
         self._test_replay_balanced_memory(policy, mem_size)
Esempio n. 2
0
    def test_balancing(self):
        p1 = ExperienceBalancedStoragePolicy({}, 100, adaptive_size=True)
        p2 = ClassBalancedStoragePolicy({}, 100, adaptive_size=True)

        for policy in [p1, p2]:
            self.assert_balancing(policy)
Esempio n. 3
0
 def setUp(self) -> None:
     self.memory = {}
     self.policy = ClassBalancedStoragePolicy(self.memory, mem_size=4)