From 893aecaaa2000d8c0233a861062d9f7508ec7ca5 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Thu, 5 May 2022 09:58:40 +0800 Subject: [PATCH] Fix warnings. --- egs/librispeech/ASR/pruned_transducer_stateless2/model.py | 7 ++++--- .../ASR/pruned_transducer_stateless4/conformer.py | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/egs/librispeech/ASR/pruned_transducer_stateless2/model.py b/egs/librispeech/ASR/pruned_transducer_stateless2/model.py index 599bf2506..2434fd41d 100644 --- a/egs/librispeech/ASR/pruned_transducer_stateless2/model.py +++ b/egs/librispeech/ASR/pruned_transducer_stateless2/model.py @@ -51,9 +51,10 @@ class Transducer(nn.Module): is (N, U) and its output shape is (N, U, decoder_dim). It should contain one attribute: `blank_id`. joiner: - It has two inputs with shapes: (N, T, encoder_dim) and (N, U, decoder_dim). - Its output shape is (N, T, U, vocab_size). Note that its output contains - unnormalized probs, i.e., not processed by log-softmax. + It has two inputs with shapes: (N, T, encoder_dim) and + (N, U, decoder_dim). + Its output shape is (N, T, U, vocab_size). Note that its output + contains unnormalized probs, i.e., not processed by log-softmax. """ super().__init__() assert isinstance(encoder, EncoderInterface), type(encoder) diff --git a/egs/librispeech/ASR/pruned_transducer_stateless4/conformer.py b/egs/librispeech/ASR/pruned_transducer_stateless4/conformer.py index 9a4dc61c5..6f7231f4b 100644 --- a/egs/librispeech/ASR/pruned_transducer_stateless4/conformer.py +++ b/egs/librispeech/ASR/pruned_transducer_stateless4/conformer.py @@ -1314,6 +1314,7 @@ def _test_random_combine_main(): torch.randn(batch_size, seq_len, feature_dim), torch.full((batch_size,), seq_len, dtype=torch.int64), ) + f # to remove flake8 warnings if __name__ == "__main__":