mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-08 09:32:20 +00:00
remove unused codes. (#821)
This commit is contained in:
parent
b9626f2e06
commit
9a9c5a0f9b
@ -1512,24 +1512,6 @@ class EmformerEncoder(nn.Module):
|
||||
)
|
||||
return states
|
||||
|
||||
attn_caches = [
|
||||
[
|
||||
torch.zeros(self.memory_size, self.d_model, device=device),
|
||||
torch.zeros(self.left_context_length, self.d_model, device=device),
|
||||
torch.zeros(self.left_context_length, self.d_model, device=device),
|
||||
]
|
||||
for _ in range(self.num_encoder_layers)
|
||||
]
|
||||
conv_caches = [
|
||||
torch.zeros(self.d_model, self.cnn_module_kernel - 1, device=device)
|
||||
for _ in range(self.num_encoder_layers)
|
||||
]
|
||||
states: Tuple[List[List[torch.Tensor]], List[torch.Tensor]] = (
|
||||
attn_caches,
|
||||
conv_caches,
|
||||
)
|
||||
return states
|
||||
|
||||
|
||||
class Emformer(EncoderInterface):
|
||||
def __init__(
|
||||
|
Loading…
x
Reference in New Issue
Block a user