MCPcopy Index your code
hub / github.com/modelscope/FunASR / __init__

Method __init__

funasr/models/lcbnet/model.py:37–206  ·  view source on GitHub ↗

Initialize LCBNet. 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,
        decoder: str = None,
        decoder_conf: dict = None,
        text_encoder: str = None,
        text_encoder_conf: dict = None,
        bias_predictor: str = None,
        bias_predictor_conf: dict = None,
        fusion_encoder: str = None,
        fusion_encoder_conf: dict = None,
        ctc: str = None,
        ctc_conf: dict = None,
        ctc_weight: float = 0.5,
        interctc_weight: float = 0.0,
        select_num: int = 2,
        select_length: int = 3,
        insert_blank: bool = True,
        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,
        report_cer: bool = True,
        report_wer: bool = True,
        sym_space: str = "<space>",
        sym_blank: str = "<blank>",
        # extract_feats_in_collect_stats: bool = True,
        share_embedding: bool = False,
        # preencoder: Optional[AbsPreEncoder] = None,
        # postencoder: Optional[AbsPostEncoder] = None,
        **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 decoder: str = None,
46 decoder_conf: dict = None,
47 text_encoder: str = None,
48 text_encoder_conf: dict = None,
49 bias_predictor: str = None,
50 bias_predictor_conf: dict = None,
51 fusion_encoder: str = None,
52 fusion_encoder_conf: dict = None,
53 ctc: str = None,
54 ctc_conf: dict = None,
55 ctc_weight: float = 0.5,
56 interctc_weight: float = 0.0,
57 select_num: int = 2,
58 select_length: int = 3,
59 insert_blank: bool = True,
60 input_size: int = 80,
61 vocab_size: int = -1,
62 ignore_id: int = -1,
63 blank_id: int = 0,
64 sos: int = 1,
65 eos: int = 2,
66 lsm_weight: float = 0.0,
67 length_normalized_loss: bool = False,
68 report_cer: bool = True,
69 report_wer: bool = True,
70 sym_space: str = "<space>",
71 sym_blank: str = "<blank>",
72 # extract_feats_in_collect_stats: bool = True,
73 share_embedding: bool = False,
74 # preencoder: Optional[AbsPreEncoder] = None,
75 # postencoder: Optional[AbsPostEncoder] = None,
76 **kwargs,
77 ):
78
79 """Initialize LCBNet.
80
81 Args:
82 specaug: TODO.
83 specaug_conf: Configuration dict for specaug.
84 normalize: TODO.
85 normalize_conf: Configuration dict for normalize.
86 encoder: TODO.
87 encoder_conf: Configuration dict for encoder.
88 decoder: TODO.
89 decoder_conf: Configuration dict for decoder.
90 text_encoder: TODO.
91 text_encoder_conf: Configuration dict for text_encoder.
92 bias_predictor: TODO.
93 bias_predictor_conf: Configuration dict for bias_predictor.
94 fusion_encoder: TODO.

Callers

nothing calls this directly

Calls 3

CTCClass · 0.90
LabelSmoothingLossClass · 0.90
output_sizeMethod · 0.45

Tested by

no test coverage detected