Fix bug RE seq lengths

This commit is contained in:
Daniel Povey 2022-10-28 19:26:06 +08:00
parent d7d5188bd9
commit de9a6ebd6c

View File

@ -228,7 +228,8 @@ class Zipformer(EncoderInterface):
x = self.downsample_output(x)
# class Downsample has this rounding behavior..
lengths = (x_lens + 1) // 2
assert self.output_downsampling_factor == 2
lengths = (lengths + 1) // 2
x = x.permute(1, 0, 2) # (T, N, C) ->(N, T, C)