From b9a95af099995cb0f238a1fd84ae44407cf9a396 Mon Sep 17 00:00:00 2001 From: Daniel Povey Date: Fri, 7 Oct 2022 18:50:53 +0800 Subject: [PATCH] Remove the feature where it was bypassing groups of layers. --- .../ASR/pruned_transducer_stateless7/conformer.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/egs/librispeech/ASR/pruned_transducer_stateless7/conformer.py b/egs/librispeech/ASR/pruned_transducer_stateless7/conformer.py index 1c084f92e..b55ae9ac1 100644 --- a/egs/librispeech/ASR/pruned_transducer_stateless7/conformer.py +++ b/egs/librispeech/ASR/pruned_transducer_stateless7/conformer.py @@ -49,7 +49,7 @@ class Conformer(EncoderInterface): layer_dropout (float): layer-dropout rate. cnn_module_kernel (int): Kernel size of convolution module vgg_frontend (bool): whether to use vgg frontend. - warmup (float): number of batches to warm up over (gradually skip + warmup_batches (float): number of batches to warm up over (gradually skip layer bypass) """ @@ -467,12 +467,12 @@ class ConformerEncoder(nn.Module): output = apply_bypass(outputs[-1], output, warmup, 0.1, 0.5) # also apply bypass to twos and fours of layers. - if i > 0 and i % 2 == 0: - output = apply_bypass(outputs[-2], output, - warmup, 0.25, 1.0) - if i > 0 and i % 4 == 0: - output = apply_bypass(outputs[-4], output, - warmup, 0.25, 1.0) + #if i > 0 and i % 2 == 0: + # output = apply_bypass(outputs[-2], output, + # warmup, 0.25, 1.0) + #if i > 0 and i % 4 == 0: + # output = apply_bypass(outputs[-4], output, + # warmup, 0.25, 1.0) output = output * feature_mask outputs.append(output)