diff --git a/egs/libriheavy/LM/zipformer1/subformer.py b/egs/libriheavy/LM/zipformer1/subformer.py index e1aca3fdb..15717a2b9 100644 --- a/egs/libriheavy/LM/zipformer1/subformer.py +++ b/egs/libriheavy/LM/zipformer1/subformer.py @@ -686,6 +686,8 @@ class SubformerEncoder(nn.Module): changing the batch size. """ (seq_len, batch_size, num_channels) = src.shape + if chunk_size == seq_len: + return src src = src.transpose(0, 1).contiguous().reshape(-1, chunk_size, num_channels) return src.transpose(0, 1).contiguous()