espnet.nets.pytorch_backend.transducer.joint_network.JointNetwork
Less than 1 minute
espnet.nets.pytorch_backend.transducer.joint_network.JointNetwork
class espnet.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