espnet2.asr.postencoder.hugging_face_transformers_postencoder.HuggingFaceTransformersPostEncoder
Less than 1 minute
espnet2.asr.postencoder.hugging_face_transformers_postencoder.HuggingFaceTransformersPostEncoder
class espnet2.asr.postencoder.hugging_face_transformers_postencoder.HuggingFaceTransformersPostEncoder(input_size: int, model_name_or_path: str, length_adaptor_n_layers: int = 0, lang_token_id: int = -1)
Bases: AbsPostEncoder
Hugging Face Transformers PostEncoder.
Initialize the module.
forward(input: Tensor, input_lengths: Tensor) → Tuple[Tensor, Tensor]
Forward.
output_size() → int
Get the output size.
reload_pretrained_parameters()