From 68289aeee5f1d3ab240bc86a61c3e7c33a8a9028 Mon Sep 17 00:00:00 2001 From: Jeffrey Hu Date: Tue, 29 Oct 2024 11:39:36 -0700 Subject: [PATCH] warmup 3 --- examples/blur_opt.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/blur_opt.py b/examples/blur_opt.py index 68f270e0..d01a552a 100644 --- a/examples/blur_opt.py +++ b/examples/blur_opt.py @@ -81,10 +81,12 @@ def mask_loss(self, blur_mask: Tensor, step: int, eps: float = 1e-2): sparsity. During warmup, the bias is even higher to start with a sparse mask.""" x = blur_mask.mean() if step <= self.num_warmup_steps: - a = 2 + a = 3 + b = 0.1 else: a = 1 - maskloss = a * (1 / (1 - x + eps) - 1) + 0.1 * (1 / (x + eps) - 1) + b = 0.1 + maskloss = a * (1 / (1 - x + eps) - 1) + b * (1 / (x + eps) - 1) return maskloss