espnet.nets.pytorch_backend.transducer.utils.create_lm_batch_states
Less than 1 minute
espnet.nets.pytorch_backend.transducer.utils.create_lm_batch_states
espnet.nets.pytorch_backend.transducer.utils.create_lm_batch_states(lm_states: List[Any] | Dict[str, Any], lm_layers, is_wordlm: bool) → List[Any] | Dict[str, Any]
Create LM hidden states.
- Parameters:
- lm_states – LM hidden states.
- lm_layers – Number of LM layers.
- is_wordlm – Whether provided LM is a word-level LM.
- Returns: LM hidden states.
- Return type: new_states