Make 20 the limit for warmup_count

This commit is contained in:
Daniel Povey 2022-10-25 12:58:27 +08:00
parent 6ebff23cb9
commit 3159b09e8f

View File

@ -450,11 +450,14 @@ class ConformerEncoder(nn.Module):
initial_layerdrop_prob = 0.5
final_layerdrop_prob = 0.05
if warmup_count < 5.0:
# As a special case, if warmup_count < 5.0 return 0 (drop no
if warmup_count < 20.0:
# As a special case, if warmup_count < 20.0 return 0 (drop no
# layers). This is rather ugly, I'm afraid; it is intended to
# enable our scan_pessimistic_batches_for_oom() code to work correctly
# so if we are going to get OOM it will happen early.
# also search for 'warmup_count' with quotes in this file to see
# how we initialize the warmup count to a random number between
# 0 and 10.
return 0.0
elif warmup_count < layer_warmup_begin:
return initial_layerdrop_prob