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