mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
Fix self.training condition
This commit is contained in:
parent
e1fb25262a
commit
54048009db
@ -1022,7 +1022,7 @@ class ScheduledFloat(torch.nn.Module):
|
||||
if random.random() < print_prob:
|
||||
logging.info(f"ScheduledFloat: name={self.name}, batch_count={self.batch_count}, ans={ans}")
|
||||
batch_count = self.batch_count
|
||||
if batch_count is None or self.training or torch.jit.is_scripting():
|
||||
if batch_count is None or not self.training or torch.jit.is_scripting():
|
||||
return float(self.default)
|
||||
if batch_count <= self.schedule[0][0]:
|
||||
ans = self.schedule[0][1]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user