MCPcopy Create free account
hub / github.com/espnet/espnet / init_state

Method init_state

espnet2/asr/decoder/s4_decoder.py:89–91  ·  view source on GitHub ↗

Initialize state.

(self, x: torch.Tensor)

Source from the content-addressed store, hash-verified

87 self.output = torch.nn.Linear(self.d_model, vocab_size)
88
89 def init_state(self, x: torch.Tensor):
90 """Initialize state."""
91 return self.decoder.default_state(1, device=x.device)
92
93 def forward(
94 self,

Callers 15

resetMethod · 0.45
greedy_searchMethod · 0.45
default_beam_searchMethod · 0.45
time_sync_decodingMethod · 0.45
nsc_beam_searchMethod · 0.45
greedy_searchMethod · 0.45
default_beam_searchMethod · 0.45
time_sync_decodingMethod · 0.45
nsc_beam_searchMethod · 0.45

Calls 1

default_stateMethod · 0.45

Tested by 4

test_decoder_cacheFunction · 0.36
test_TransformerLM_scoreFunction · 0.36