Initialize Paraformer. Args: specaug: TODO. specaug_conf: Configuration dict for specaug. normalize: TODO. normalize_conf: Configuration dict for normalize. encoder: TODO. encoder_con
(
self,
specaug: Optional[str] = None,
specaug_conf: Optional[Dict] = None,
normalize: str = None,
normalize_conf: Optional[Dict] = None,
encoder: str = None,
encoder_conf: Optional[Dict] = None,
decoder: str = None,
decoder_conf: Optional[Dict] = None,
ctc: str = None,
ctc_conf: Optional[Dict] = None,
predictor: str = None,
predictor_conf: Optional[Dict] = None,
ctc_weight: 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,
# report_cer: bool = True,
# report_wer: bool = True,
# sym_space: str = "<space>",
# sym_blank: str = "<blank>",
# extract_feats_in_collect_stats: bool = True,
# predictor=None,
predictor_weight: float = 0.0,
predictor_bias: int = 0,
sampling_ratio: float = 0.2,
share_embedding: bool = False,
# preencoder: Optional[AbsPreEncoder] = None,
# postencoder: Optional[AbsPostEncoder] = None,
use_1st_decoder_loss: bool = False,
**kwargs,
)
| 51 | """ |
| 52 | |
| 53 | def __init__( |
| 54 | self, |
| 55 | specaug: Optional[str] = None, |
| 56 | specaug_conf: Optional[Dict] = None, |
| 57 | normalize: str = None, |
| 58 | normalize_conf: Optional[Dict] = None, |
| 59 | encoder: str = None, |
| 60 | encoder_conf: Optional[Dict] = None, |
| 61 | decoder: str = None, |
| 62 | decoder_conf: Optional[Dict] = None, |
| 63 | ctc: str = None, |
| 64 | ctc_conf: Optional[Dict] = None, |
| 65 | predictor: str = None, |
| 66 | predictor_conf: Optional[Dict] = None, |
| 67 | ctc_weight: float = 0.5, |
| 68 | input_size: int = 80, |
| 69 | vocab_size: int = -1, |
| 70 | ignore_id: int = -1, |
| 71 | blank_id: int = 0, |
| 72 | sos: int = 1, |
| 73 | eos: int = 2, |
| 74 | lsm_weight: float = 0.0, |
| 75 | length_normalized_loss: bool = False, |
| 76 | # report_cer: bool = True, |
| 77 | # report_wer: bool = True, |
| 78 | # sym_space: str = "<space>", |
| 79 | # sym_blank: str = "<blank>", |
| 80 | # extract_feats_in_collect_stats: bool = True, |
| 81 | # predictor=None, |
| 82 | predictor_weight: float = 0.0, |
| 83 | predictor_bias: int = 0, |
| 84 | sampling_ratio: float = 0.2, |
| 85 | share_embedding: bool = False, |
| 86 | # preencoder: Optional[AbsPreEncoder] = None, |
| 87 | # postencoder: Optional[AbsPostEncoder] = None, |
| 88 | use_1st_decoder_loss: bool = False, |
| 89 | **kwargs, |
| 90 | ): |
| 91 | |
| 92 | """Initialize Paraformer. |
| 93 | |
| 94 | Args: |
| 95 | specaug: TODO. |
| 96 | specaug_conf: Configuration dict for specaug. |
| 97 | normalize: TODO. |
| 98 | normalize_conf: Configuration dict for normalize. |
| 99 | encoder: TODO. |
| 100 | encoder_conf: Configuration dict for encoder. |
| 101 | decoder: TODO. |
| 102 | decoder_conf: Configuration dict for decoder. |
| 103 | ctc: TODO. |
| 104 | ctc_conf: Configuration dict for ctc. |
| 105 | predictor: TODO. |
| 106 | predictor_conf: Configuration dict for predictor. |
| 107 | ctc_weight: TODO. |
| 108 | input_size: Size/dimension parameter. |
| 109 | vocab_size: Size/dimension parameter. |
| 110 | ignore_id: TODO. |
nothing calls this directly
no test coverage detected