class_docstr: This class represents a particular config for a set of signal
  processing based sparsification functions on tensors. This can
  be used both on weights, gradients and other tensors like the
  optimizer state.
  
  During initialization, this class requires a value for one of
  `sst_top_k_element` or `sst_top_k_percent` and also requires a
  value for one of `dst_top_k_element` or `dst_top_k_percent`.
  
  This class only handles tensor inputs and outputs. We leave
  state_dict type of data handling to upper layer functions.
  
  Args:
      algo (Algo):
          The algorithm used. Default: FFT
      sst_top_k_dim (int, optional):
          The dimension on which the top-k is done for SST.
          E.g. -1 is the last dim. None means flatten and top-k on all dims.
          There is no way to specify multiple dims other than None.
          Default: -1
      sst_top_k_element (int, optional):
          Number of top-k elements to retain for SST. Default: None
      sst_top_k_percent (float, optional):
          Percent of top-k elements to retain for SST. Default: None
      dst_top_k_dim (int, optional):
          The dimension on which the top-k is done for DST.
          E.g. -1 is the last dim. None means flatten and top-k on all dims.
          There is no way to specify multiple dims other than None.
          Default: None
      dst_top_k_element (int, optional):
          Number of top-k elements to retain for DST. Default: None
      dst_top_k_percent (float, optional):
          Percent of top-k elements to retain for DST. Default: None
  
  Example:
      .. code-block:: python
  
          2d_sparser = SignalSparsity(sst_top_k_element=10, dst_top_k_element=1)
          sst = 2d_sparser.dense_to_sst(linear.weight.data)
  
          3d_sparser = SingalSparsity(algo=Algo.FFT, sst_top_k_dim=None, dst_top_k_dim=-1, sst_top_k_percent=10, dst_top_k_element=100)
          conv.weight.data, _, _ = 3d_sparser.lossy_compress(conv.weight.data)
code: def __init__(
      self,
      algo: Algo = Algo.FFT,
      sst_top_k_dim: Optional[int] = -1,
      sst_top_k_element: Optional[int] = None,
      sst_top_k_percent: Optional[float] = None,
      dst_top_k_dim: Optional[int] = -1,
      dst_top_k_element: Optional[int] = None,
      dst_top_k_percent: Optional[float] = None,
  ) -> None:
      self._sst_top_k_dim = sst_top_k_dim
      self._sst_top_k_element = sst_top_k_element
      self._sst_top_k_percent = sst_top_k_percent
      self._dst_top_k_dim = dst_top_k_dim
      self._dst_top_k_element = dst_top_k_element
      self._dst_top_k_percent = dst_top_k_percent
  
      self._validate_conf()
      self._transform, self._inverse_transform = (
          (_fft_transform, _ifft_transform)
          if algo is Algo.FFT
          else (_dct_transform, _idct_transform)
      )
  
imports: from enum import Enum
  from typing import Optional, Tuple
  import torch
  from torch import Tensor
label_desc: Use image node_id 1 to create a new SignalSparsity object  with example: obj = SignalSparsity(algo, sst_top_k_dim, sst_top_k_element, sst_top_k_percent, dst_top_k_dim, dst_top_k_element, dst_top_k_percent)