espnet2.enh.layers.dnn_beamformer.AttentionReference
Less than 1 minute
espnet2.enh.layers.dnn_beamformer.AttentionReference
class espnet2.enh.layers.dnn_beamformer.AttentionReference(bidim, att_dim, eps=1e-06)
Bases: Module
Initializes internal Module state, shared by both nn.Module and ScriptModule.
forward(psd_in: Tensor | ComplexTensor, ilens: LongTensor, scaling: float = 2.0) → Tuple[Tensor, LongTensor]
Attention-based reference forward function.
- Parameters:
- psd_in (torch.complex64/ComplexTensor) – (B, F, C, C)
- ilens (torch.Tensor) – (B,)
- scaling (float)
- Returns: (B, C) ilens (torch.Tensor): (B,)
- Return type: u (torch.Tensor)