Change scale_factor_scale from 0.5 to 0.8

This commit is contained in:
Daniel Povey 2022-10-12 20:55:52 +08:00
parent b736bb4840
commit 49c6b6943d

View File

@ -376,7 +376,7 @@ class ActivationBalancer(torch.nn.Module):
# Instead we make the min_positive constraint stronger, so it first makes the value # Instead we make the min_positive constraint stronger, so it first makes the value
# sometimes negative, and only when that is satisfied, can deal with the absolute-value # sometimes negative, and only when that is satisfied, can deal with the absolute-value
# constraint. # constraint.
scale_factor_scale = 0.5 scale_factor_scale = 0.8
below_threshold = (self.abs_mean < self.min_abs) below_threshold = (self.abs_mean < self.min_abs)
above_threshold = (self.abs_mean > self.max_abs) above_threshold = (self.abs_mean > self.max_abs)
scale_factor[:] = ((below_threshold.to(torch.float32) - scale_factor[:] = ((below_threshold.to(torch.float32) -