mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
Change chunk-size setup
This commit is contained in:
parent
a6eb45840a
commit
399a79ace6
@ -677,7 +677,7 @@ class SubformerEncoder(nn.Module):
|
|||||||
assert seq_len % self.chunk_size == 0, (seq_len, self.chunk_size)
|
assert seq_len % self.chunk_size == 0, (seq_len, self.chunk_size)
|
||||||
num_layers = len(self.layers)
|
num_layers = len(self.layers)
|
||||||
chunk_indexes = [0, 1] * (num_layers + 1 // 2)
|
chunk_indexes = [0, 1] * (num_layers + 1 // 2)
|
||||||
return [ self.chunk_size, self.chunk_size * 2 ], chunk_indexes[:num_layers]
|
return [ self.chunk_size, seq_len ], chunk_indexes[:num_layers]
|
||||||
|
|
||||||
|
|
||||||
def _to_chunk_size(self, src: Tensor, chunk_size: int) -> Tensor:
|
def _to_chunk_size(self, src: Tensor, chunk_size: int) -> Tensor:
|
||||||
|
|||||||
@ -395,7 +395,7 @@ def get_params() -> AttributeDict:
|
|||||||
"warm_step": 2000,
|
"warm_step": 2000,
|
||||||
"env_info": get_env_info(),
|
"env_info": get_env_info(),
|
||||||
"bytes_per_segment": 2048,
|
"bytes_per_segment": 2048,
|
||||||
"batch_size": 22,
|
"batch_size": 20,
|
||||||
"train_file_list": "train.txt",
|
"train_file_list": "train.txt",
|
||||||
"valid_file_list": "valid.txt",
|
"valid_file_list": "valid.txt",
|
||||||
"num_workers": 4,
|
"num_workers": 4,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user