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)
docstr: From SST and DST returns a dense reconstructed tensor (RT). When argument dst=None, simply returns
  the inverse transform of the SST tensor.
  
  Args:
      sst (Tensor):
          Singal sparse tensor. Required argument.
      dst (Tensor, optional):
          Delta sparse tensor, optional.
  
  Returns:
      (Tensor):
          A dense tensor in real number domain from the SST.
docstr_tok: ["From","SST","and","DST","returns","a","dense","reconstructed","tensor","(","RT",")",".","When","argument","dst=None",",","simply","returns","the","inverse","transform","of","the","SST","tensor",".","Args",":","sst","(","Tensor",")",":","Singal","sparse","tensor",".","Required","argument",".","dst","(","Tensor",",","optional",")",":","Delta","sparse","tensor",",","optional",".","Returns",":","(","Tensor",")",":","A","dense","tensor","in","real","number","domain","from","the","SST","."]
code: def sst_dst_to_dense(
      self, sst: Optional[Tensor], dst: Optional[Tensor] = None
  ) -> Tensor:
      """From SST and DST returns a dense reconstructed tensor (RT). When argument dst=None, simply returns
      the inverse transform of the SST tensor.
  
      Args:
          sst (Tensor):
              Singal sparse tensor. Required argument.
          dst (Tensor, optional):
              Delta sparse tensor, optional.
  
      Returns:
          (Tensor):
              A dense tensor in real number domain from the SST.
      """
      assert not (
          sst is None and dst is None
      ), "both-None-case is not useful"
  
      if sst is None:
          # Simply the delta is the reconstruction.
          return dst
  
      # Now, ifft and then add the delta.
      dense_rt = torch.real(
          self._inverse_transform(sst, dim=self._sst_top_k_dim)
      )
      if dst is not None:
          dense_rt += dst
      return dense_rt
  
imports: from enum import Enum
  from typing import Optional, Tuple
  import torch
  from torch import Tensor
label_desc: Use image node_id 7 for calling the SignalSparsity obj's underlying member method code with example usage: obj.sst_dst_to_dense(sst, dst) and returns: dense_rt, dst