mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-09-19 05:54:20 +00:00
Don't skip penalize_abs_values_gt due to memory cutoff; remove grad_scale=0.1
This commit is contained in:
parent
7fdd125ba9
commit
cbd59b9c68
@ -892,7 +892,6 @@ class LearnedDownsamplingModule(nn.Module):
|
||||
max_positive=0.6,
|
||||
min_abs=1.0,
|
||||
max_abs=4.0,
|
||||
grad_scale=0.1,
|
||||
prob=ScheduledFloat((0.0, 1.0), (8000.0, 0.25), default=0.0))
|
||||
|
||||
|
||||
|
@ -897,8 +897,9 @@ class AbsValuePenalizer(nn.Module):
|
||||
|
||||
def forward(self, x: Tensor) -> Tensor:
|
||||
if (torch.jit.is_scripting() or not x.requires_grad or
|
||||
(x.is_cuda and self.mem_cutoff(torch.cuda.memory_allocated()))
|
||||
or not self.training
|
||||
or random.random() > self.prob):
|
||||
# or (x.is_cuda and self.mem_cutoff(torch.cuda.memory_allocated()))
|
||||
return _no_op(x) # the _no_op op is to make our diagnostics code work.
|
||||
|
||||
x = penalize_abs_values_gt(x,
|
||||
|
Loading…
x
Reference in New Issue
Block a user