class_docstr: Hybrid Demucs model from
  *Hybrid Spectrogram and Waveform Source Separation* :cite:`defossez2021hybrid`.
  
  See Also:
      * :class:`torchaudio.pipelines.SourceSeparationBundle`: Source separation pipeline with pre-trained models.
  
  Args:
      sources (List[str]): list of source names. List can contain the following source
          options: [``"bass"``, ``"drums"``, ``"other"``, ``"mixture"``, ``"vocals"``].
      audio_channels (int, optional): input/output audio channels. (Default: 2)
      channels (int, optional): initial number of hidden channels. (Default: 48)
      growth (int, optional): increase the number of hidden channels by this factor at each layer. (Default: 2)
      nfft (int, optional): number of fft bins. Note that changing this requires careful computation of
          various shape parameters and will not work out of the box for hybrid models. (Default: 4096)
      depth (int, optional): number of layers in encoder and decoder (Default: 6)
      freq_emb (float, optional): add frequency embedding after the first frequency layer if > 0,
          the actual value controls the weight of the embedding. (Default: 0.2)
      emb_scale (int, optional): equivalent to scaling the embedding learning rate (Default: 10)
      emb_smooth (bool, optional): initialize the embedding with a smooth one (with respect to frequencies).
          (Default: ``True``)
      kernel_size (int, optional): kernel_size for encoder and decoder layers. (Default: 8)
      time_stride (int, optional): stride for the final time layer, after the merge. (Default: 2)
      stride (int, optional): stride for encoder and decoder layers. (Default: 4)
      context (int, optional): context for 1x1 conv in the decoder. (Default: 4)
      context_enc (int, optional): context for 1x1 conv in the encoder. (Default: 0)
      norm_starts (int, optional): layer at which group norm starts being used.
          decoder layers are numbered in reverse order. (Default: 4)
      norm_groups (int, optional): number of groups for group norm. (Default: 4)
      dconv_depth (int, optional): depth of residual DConv branch. (Default: 2)
      dconv_comp (int, optional): compression of DConv branch. (Default: 4)
      dconv_attn (int, optional): adds attention layers in DConv branch starting at this layer. (Default: 4)
      dconv_lstm (int, optional): adds a LSTM layer in DConv branch starting at this layer. (Default: 4)
      dconv_init (float, optional): initial scale for the DConv branch LayerScale. (Default: 1e-4)
class_docstr_tok: ["Hybrid","Demucs","model","from","*","Hybrid","Spectrogram","and","Waveform","Source","Separation","*",":","cite",":","`","defossez2021hybrid","`",".","See","Also",":","*",":","class",":","`","torchaudio.pipelines.SourceSeparationBundle","`",":","Source","separation","pipeline","with","pre-trained","models",".","Args",":","sources","(","List","[","str","]",")",":","list","of","source","names",".","List","can","contain","the","following","source","options",":","[","``","``","bass","''","``",",","``","``","drums","''","``",",","``","``","other","''","``",",","``","``","mixture","''","``",",","``","``","vocals","''","``","]",".","audio_channels","(","int",",","optional",")",":","input\/output","audio","channels",".","(","Default",":","2",")","channels","(","int",",","optional",")",":","initial","number","of","hidden","channels",".","(","Default",":","48",")","growth","(","int",",","optional",")",":","increase","the","number","of","hidden","channels","by","this","factor","at","each","layer",".","(","Default",":","2",")","nfft","(","int",",","optional",")",":","number","of","fft","bins",".","Note","that","changing","this","requires","careful","computation","of","various","shape","parameters","and","will","not","work","out","of","the","box","for","hybrid","models",".","(","Default",":","4096",")","depth","(","int",",","optional",")",":","number","of","layers","in","encoder","and","decoder","(","Default",":","6",")","freq_emb","(","float",",","optional",")",":","add","frequency","embedding","after","the","first","frequency","layer","if",">","0",",","the","actual","value","controls","the","weight","of","the","embedding",".","(","Default",":","0.2",")","emb_scale","(","int",",","optional",")",":","equivalent","to","scaling","the","embedding","learning","rate","(","Default",":","10",")","emb_smooth","(","bool",",","optional",")",":","initialize","the","embedding","with","a","smooth","one","(","with","respect","to","frequencies",")",".","(","Default",":","``","True","``",")","kernel_size","(","int",",","optional",")",":","kernel_size","for","encoder","and","decoder","layers",".","(","Default",":","8",")","time_stride","(","int",",","optional",")",":","stride","for","the","final","time","layer",",","after","the","merge",".","(","Default",":","2",")","stride","(","int",",","optional",")",":","stride","for","encoder","and","decoder","layers",".","(","Default",":","4",")","context","(","int",",","optional",")",":","context","for","1x1","conv","in","the","decoder",".","(","Default",":","4",")","context_enc","(","int",",","optional",")",":","context","for","1x1","conv","in","the","encoder",".","(","Default",":","0",")","norm_starts","(","int",",","optional",")",":","layer","at","which","group","norm","starts","being","used",".","decoder","layers","are","numbered","in","reverse","order",".","(","Default",":","4",")","norm_groups","(","int",",","optional",")",":","number","of","groups","for","group","norm",".","(","Default",":","4",")","dconv_depth","(","int",",","optional",")",":","depth","of","residual","DConv","branch",".","(","Default",":","2",")","dconv_comp","(","int",",","optional",")",":","compression","of","DConv","branch",".","(","Default",":","4",")","dconv_attn","(","int",",","optional",")",":","adds","attention","layers","in","DConv","branch","starting","at","this","layer",".","(","Default",":","4",")","dconv_lstm","(","int",",","optional",")",":","adds","a","LSTM","layer","in","DConv","branch","starting","at","this","layer",".","(","Default",":","4",")","dconv_init","(","float",",","optional",")",":","initial","scale","for","the","DConv","branch","LayerScale",".","(","Default",":","1e-4",")"]
code: def _magnitude(self, z):
      # move the complex dimension to the channel one.
      B, C, Fr, T = z.shape
      m = torch.view_as_real(z).permute(0, 1, 4, 2, 3)
      m = m.reshape(B, C * 2, Fr, T)
      return m
  
imports: import math
  import typing
  from typing import Any, Dict, List, Optional
  import torch
  from torch import nn
  from torch.nn import functional
label_desc: Use image node_id 5 for calling the HDemucs obj's underlying member method code with example usage: obj._magnitude(z) and returns: m