MCPcopy Create free account
hub / github.com/modelscope/FunASR / __init__

Method __init__

funasr/models/uniasr/model.py:37–233  ·  view source on GitHub ↗

Initialize UniASR. Args: specaug: TODO. specaug_conf: Configuration dict for specaug. normalize: TODO. normalize_conf: Configuration dict for normalize. encoder: TODO. encoder_conf: C

(
        self,
        specaug: str = None,
        specaug_conf: dict = None,
        normalize: str = None,
        normalize_conf: dict = None,
        encoder: str = None,
        encoder_conf: dict = None,
        encoder2: str = None,
        encoder2_conf: dict = None,
        decoder: str = None,
        decoder_conf: dict = None,
        decoder2: str = None,
        decoder2_conf: dict = None,
        predictor: str = None,
        predictor_conf: dict = None,
        predictor_bias: int = 0,
        predictor_weight: float = 0.0,
        predictor2: str = None,
        predictor2_conf: dict = None,
        predictor2_bias: int = 0,
        predictor2_weight: float = 0.0,
        ctc: str = None,
        ctc_conf: dict = None,
        ctc_weight: float = 0.5,
        ctc2: str = None,
        ctc2_conf: dict = None,
        ctc2_weight: float = 0.5,
        decoder_attention_chunk_type: str = "chunk",
        decoder_attention_chunk_type2: str = "chunk",
        stride_conv=None,
        stride_conv_conf: dict = None,
        loss_weight_model1: float = 0.5,
        input_size: int = 80,
        vocab_size: int = -1,
        ignore_id: int = -1,
        blank_id: int = 0,
        sos: int = 1,
        eos: int = 2,
        lsm_weight: float = 0.0,
        length_normalized_loss: bool = False,
        share_embedding: bool = False,
        **kwargs,
    )

Source from the content-addressed store, hash-verified

35 """
36
37 def __init__(
38 self,
39 specaug: str = None,
40 specaug_conf: dict = None,
41 normalize: str = None,
42 normalize_conf: dict = None,
43 encoder: str = None,
44 encoder_conf: dict = None,
45 encoder2: str = None,
46 encoder2_conf: dict = None,
47 decoder: str = None,
48 decoder_conf: dict = None,
49 decoder2: str = None,
50 decoder2_conf: dict = None,
51 predictor: str = None,
52 predictor_conf: dict = None,
53 predictor_bias: int = 0,
54 predictor_weight: float = 0.0,
55 predictor2: str = None,
56 predictor2_conf: dict = None,
57 predictor2_bias: int = 0,
58 predictor2_weight: float = 0.0,
59 ctc: str = None,
60 ctc_conf: dict = None,
61 ctc_weight: float = 0.5,
62 ctc2: str = None,
63 ctc2_conf: dict = None,
64 ctc2_weight: float = 0.5,
65 decoder_attention_chunk_type: str = "chunk",
66 decoder_attention_chunk_type2: str = "chunk",
67 stride_conv=None,
68 stride_conv_conf: dict = None,
69 loss_weight_model1: float = 0.5,
70 input_size: int = 80,
71 vocab_size: int = -1,
72 ignore_id: int = -1,
73 blank_id: int = 0,
74 sos: int = 1,
75 eos: int = 2,
76 lsm_weight: float = 0.0,
77 length_normalized_loss: bool = False,
78 share_embedding: bool = False,
79 **kwargs,
80 ):
81 """Initialize UniASR.
82
83 Args:
84 specaug: TODO.
85 specaug_conf: Configuration dict for specaug.
86 normalize: TODO.
87 normalize_conf: Configuration dict for normalize.
88 encoder: TODO.
89 encoder_conf: Configuration dict for encoder.
90 encoder2: TODO.
91 encoder2_conf: Configuration dict for encoder2.
92 decoder: TODO.
93 decoder_conf: Configuration dict for decoder.
94 decoder2: TODO.

Callers

nothing calls this directly

Calls 5

output_sizeMethod · 0.95
Conv1dSubsamplingClass · 0.90
LabelSmoothingLossClass · 0.90
mae_lossClass · 0.90
output_sizeMethod · 0.45

Tested by

no test coverage detected