From 8364ce697ddf6117fdd4f7222832d546d63880de Mon Sep 17 00:00:00 2001 From: Volpeon Date: Wed, 21 Jun 2023 13:28:49 +0200 Subject: Update --- training/sampler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'training/sampler.py') diff --git a/training/sampler.py b/training/sampler.py index bdb3e90..0487d66 100644 --- a/training/sampler.py +++ b/training/sampler.py @@ -134,7 +134,7 @@ class LossSecondMomentResampler(LossAwareSampler): def weights(self): if not self._warmed_up(): return np.ones([self.num_timesteps], dtype=np.float64) - weights = np.sqrt(np.mean(self._loss_history ** 2, axis=-1)) + weights = np.sqrt(np.mean(self._loss_history**2, axis=-1)) weights /= np.sum(weights) weights *= 1 - self.uniform_prob weights += self.uniform_prob / len(weights) -- cgit v1.2.3-54-g00ecf