espnet2.asr.encoder.hugging_face_transformers_encoder.HuggingFaceTransformersEncoder
Less than 1 minute
espnet2.asr.encoder.hugging_face_transformers_encoder.HuggingFaceTransformersEncoder
class espnet2.asr.encoder.hugging_face_transformers_encoder.HuggingFaceTransformersEncoder(input_size: int, model_name_or_path: str, lang_token_id: int = -1)
Bases: AbsEncoder
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()