espnet2.legacy.nets.pytorch_backend.transducer.joint_network.JointNetwork
Less than 1 minute
espnet2.legacy.nets.pytorch_backend.transducer.joint_network.JointNetwork
class espnet2.legacy.nets.pytorch_backend.transducer.joint_network.JointNetwork(joint_output_size: int, encoder_output_size: int, decoder_output_size: int, joint_space_size: int, joint_activation_type: int)
Bases: Module
Transducer joint network module.
- Parameters:
- joint_output_size β Joint network output dimension
- encoder_output_size β Encoder output dimension.
- decoder_output_size β Decoder output dimension.
- joint_space_size β Dimension of joint space.
- joint_activation_type β Type of activation for joint network.
Joint network initializer.
forward(enc_out: Tensor, dec_out: Tensor, is_aux: bool = False, quantization: bool = False) β Tensor
Joint computation of encoder and decoder hidden state sequences.
- Parameters:
- enc_out β Expanded encoder output state sequences (B, T, 1, D_enc)
- dec_out β Expanded decoder output state sequences (B, 1, U, D_dec)
- is_aux β Whether auxiliary tasks in used.
- quantization β Whether dynamic quantization is used.
- Returns: Joint output state sequences. (B, T, U, D_out)
- Return type: joint_out
