class_docstr: Compute cross-channel power spectral density (PSD) matrix.
  
  .. devices:: CPU CUDA
  
  .. properties:: Autograd TorchScript
  
  Args:
      multi_mask (bool, optional): If ``True``, only accepts multi-channel Time-Frequency masks. (Default: ``False``)
      normalize (bool, optional): If ``True``, normalize the mask along the time dimension. (Default: ``True``)
      eps (float, optional): Value to add to the denominator in mask normalization. (Default: ``1e-15``)
docstr: Args:
      specgram (torch.Tensor): Multi-channel complex-valued spectrum.
          Tensor with dimensions `(..., channel, freq, time)`.
      mask (torch.Tensor or None, optional): Time-Frequency mask for normalization.
          Tensor with dimensions `(..., freq, time)` if multi_mask is ``False`` or
          with dimensions `(..., channel, freq, time)` if multi_mask is ``True``.
          (Default: ``None``)
  
  Returns:
      torch.Tensor: The complex-valued PSD matrix of the input spectrum.
          Tensor with dimensions `(..., freq, channel, channel)`
docstr_tok: ["Args",":","specgram","(","torch.Tensor",")",":","Multi-channel","complex-valued","spectrum",".","Tensor","with","dimensions","`","(","...",",","channel",",","freq",",","time",")","`",".","mask","(","torch.Tensor","or","None",",","optional",")",":","Time-Frequency","mask","for","normalization",".","Tensor","with","dimensions","`","(","...",",","freq",",","time",")","`","if","multi_mask","is","``","False","``","or","with","dimensions","`","(","...",",","channel",",","freq",",","time",")","`","if","multi_mask","is","``","True","``",".","(","Default",":","``","None","``",")","Returns",":","torch.Tensor",":","The","complex-valued","PSD","matrix","of","the","input","spectrum",".","Tensor","with","dimensions","`","(","...",",","freq",",","channel",",","channel",")","`"]
code: def forward(
      self, specgram: torch.Tensor, mask: Optional[torch.Tensor] = None
  ):
      """
      Args:
          specgram (torch.Tensor): Multi-channel complex-valued spectrum.
              Tensor with dimensions `(..., channel, freq, time)`.
          mask (torch.Tensor or None, optional): Time-Frequency mask for normalization.
              Tensor with dimensions `(..., freq, time)` if multi_mask is ``False`` or
              with dimensions `(..., channel, freq, time)` if multi_mask is ``True``.
              (Default: ``None``)
  
      Returns:
          torch.Tensor: The complex-valued PSD matrix of the input spectrum.
              Tensor with dimensions `(..., freq, channel, channel)`
      """
      if mask is not None:
          if self.multi_mask:
              # Averaging mask along channel dimension
              mask = mask.mean(dim=-3)  # (..., freq, time)
      psd = F.psd(specgram, mask, self.normalize, self.eps)
  
      return psd
  
imports: import warnings
  from typing import Optional, Union
  import torch
  from torch import Tensor
  from torchaudio import functional
label_desc: Use image node_id 2 for calling the PSD obj's underlying member method code with example usage: obj.forward(specgram, mask) and returns: psd