espnet2.asr_transducer.utils.get_transducer_task_io
Less than 1 minute
espnet2.asr_transducer.utils.get_transducer_task_io
espnet2.asr_transducer.utils.get_transducer_task_io(labels: Tensor, encoder_out_lens: Tensor, ignore_id: int = -1, blank_id: int = 0) → Tuple[Tensor, Tensor, Tensor, Tensor]
Get Transducer loss I/O.
- Parameters:
- labels – Label ID sequences. (B, L)
- encoder_out_lens – Encoder output lengths. (B,)
- ignore_id – Padding symbol ID.
- blank_id – Blank symbol ID.
- Returns: Decoder inputs. (B, U) target: Target label ID sequences. (B, U) t_len: Time lengths. (B,) u_len: Label lengths. (B,)
- Return type: decoder_in