class_docstr: This is the modified version of :func:`~nnAudio.Spectrogram.Combined_Frequency_Periodicity`. This version different from the original version by returnning only ``Z`` and the number of timesteps fits with other classes.
  
  Parameters
  ----------
  fr : int
      Frequency resolution. The higher the number, the lower the resolution is.
      Maximum frequency resolution occurs when ``fr=1``. The default value is ``2``
  
  fs : int
      Sample rate of the input audio clips. The default value is ``16000``
  
  hop_length : int
      The hop (or stride) size. The default value is ``320``.
  
  window_size : str
      It is same as ``n_fft`` in other Spectrogram classes. The default value is ``2049``
  
  fc : int
      Starting frequency. For example, ``fc=80`` means that `Z` starts at 80Hz.
      The default value is ``80``.
  
  tc : int
      Inverse of ending frequency. For example ``tc=1/8000`` means that `Z` ends at 8000Hz.
      The default value is ``1/8000``.
  
  g: list
      Coefficients for non-linear activation function. ``len(g)`` should be the number of activation layers.
      Each element in ``g`` is the activation coefficient, for example ``[0.24, 0.6, 1]``.
  
  device : str
      Choose which device to initialize this layer. Default value is 'cpu'
  
  Returns
  -------
  Z : torch.tensor
      The Combined Frequency and Period Feature. It is equivalent to ``tfrLF * tfrLQ``
  
  tfrL0: torch.tensor
      STFT output
  
  tfrLF: torch.tensor
      Frequency Feature
  
  tfrLQ: torch.tensor
      Period Feature
  
  Examples
  --------
  >>> spec_layer = Spectrogram.Combined_Frequency_Periodicity()
  >>> Z, tfrL0, tfrLF, tfrLQ = spec_layer(x)
class_docstr_tok: ["This","is","the","modified","version","of",":","func",":","`","~nnAudio.Spectrogram.Combined_Frequency_Periodicity","`",".","This","version","different","from","the","original","version","by","returnning","only","``","Z","``","and","the","number","of","timesteps","fits","with","other","classes",".","Parameters","--","--","--","--","--","fr",":","int","Frequency","resolution",".","The","higher","the","number",",","the","lower","the","resolution","is",".","Maximum","frequency","resolution","occurs","when","``","fr=1","``",".","The","default","value","is","``","2","``","fs",":","int","Sample","rate","of","the","input","audio","clips",".","The","default","value","is","``","16000","``","hop_length",":","int","The","hop","(","or","stride",")","size",".","The","default","value","is","``","320","``",".","window_size",":","str","It","is","same","as","``","n_fft","``","in","other","Spectrogram","classes",".","The","default","value","is","``","2049","``","fc",":","int","Starting","frequency",".","For","example",",","``","fc=80","``","means","that","`","Z","`","starts","at","80Hz",".","The","default","value","is","``","80","``",".","tc",":","int","Inverse","of","ending","frequency",".","For","example","``","tc=1\/8000","``","means","that","`","Z","`","ends","at","8000Hz",".","The","default","value","is","``","1\/8000","``",".","g",":","list","Coefficients","for","non-linear","activation","function",".","``","len","(","g",")","``","should","be","the","number","of","activation","layers",".","Each","element","in","``","g","``","is","the","activation","coefficient",",","for","example","``","[","0.24",",","0.6",",","1","]","``",".","device",":","str","Choose","which","device","to","initialize","this","layer",".","Default","value","is","'cpu'","Returns","--","--","--","-","Z",":","torch.tensor","The","Combined","Frequency","and","Period","Feature",".","It","is","equivalent","to","``","tfrLF","*","tfrLQ","``","tfrL0",":","torch.tensor","STFT","output","tfrLF",":","torch.tensor","Frequency","Feature","tfrLQ",":","torch.tensor","Period","Feature","Examples","--","--","--","--",">",">",">","spec_layer","=","Spectrogram.Combined_Frequency_Periodicity","(",")",">",">",">","Z",",","tfrL0",",","tfrLF",",","tfrLQ","=","spec_layer","(","x",")"]
code: def nonlinear_func(self, X, g, cutoff):
      cutoff = int(cutoff)
      if g != 0:
          X = torch.relu(X)
          X[:, :, :cutoff] = 0
          X[:, :, -cutoff:] = 0
          X = X.pow(g)
      else:  # when g=0, it converges to log
          X = torch.log(X.relu() + epsilon)
          X[:, :, :cutoff] = 0
          X[:, :, -cutoff:] = 0
      return X
  
file_path: nnAudio/Installation/nnAudio/features/cfp.py
imports: import numpy
  import torch
  import torch.nn
  import time
  from ..utils import *
  import scipy
label_desc: Use image node_id 4 for calling the CFP obj's underlying member method code with example usage: obj.nonlinear_func(X, g, cutoff) and returns: X