mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
modify max_len to allow longer input audio
This commit is contained in:
parent
8f8b09498f
commit
09c4946c15
@ -1305,6 +1305,12 @@ class CompactRelPositionalEncoding(torch.nn.Module):
|
||||
) -> None:
|
||||
"""Construct a CompactRelPositionalEncoding object."""
|
||||
super(CompactRelPositionalEncoding, self).__init__()
|
||||
if torch.jit.is_tracing:
|
||||
# 10k frames correspond to ~100k ms, e.g., 100 seconds, i.e.,
|
||||
# It assumes that the maximum input won't have more than
|
||||
# 10k frames.
|
||||
#
|
||||
max_len = 10000
|
||||
self.embed_dim = embed_dim
|
||||
assert embed_dim % 2 == 0
|
||||
self.dropout = Dropout2(dropout_rate)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user