athena.models.asr.av_mtl_seq2seq
¶
a implementation of multi-task model with attention and ctc loss
Module Contents¶
Classes¶
In speech recognition, adding CTC loss to Attention-based seq-to-seq model is known to |
- class athena.models.asr.av_mtl_seq2seq.AV_MtlTransformer(data_descriptions, config=None)¶
Bases:
athena.models.base.BaseModel
In speech recognition, adding CTC loss to Attention-based seq-to-seq model is known to help convergence. It usually gives better results than using attention alone.
- SUPPORTED_MODEL¶
- default_config¶
- call(samples, training=None)¶
call function in keras layers
- get_loss(outputs, samples, training=None)¶
get loss used for training
- compute_logit_length(input_length)¶
compute the logit length
- reset_metrics()¶
reset the metrics
- restore_from_pretrained_model(pretrained_model, model_type='')¶
A more general-purpose interface for pretrained model restoration :param pretrained_model: checkpoint path of mpc model :param model_type: the type of pretrained model to restore
- decode(samples, hparams=None, lm_model=None)¶
Initialization of the model for decoding, decoder is called here to create predictions
- Parameters
samples – the data source to be decoded
hparams – decoding configs are included here
lm_model – lm model
Returns:
predictions: the corresponding decoding results