class_docstr: IDWT2D
class_docstr_tok: ["IDWT2D"]
code: def __init__(self, wave):
      super().__init__()
      w = pywt.Wavelet(wave)
      rec_hi = torch.Tensor(w.rec_hi)
      rec_lo = torch.Tensor(w.rec_lo)
  
      w_ll = rec_lo.unsqueeze(0) * rec_lo.unsqueeze(1)
      w_lh = rec_lo.unsqueeze(0) * rec_hi.unsqueeze(1)
      w_hl = rec_hi.unsqueeze(0) * rec_lo.unsqueeze(1)
      w_hh = rec_hi.unsqueeze(0) * rec_hi.unsqueeze(1)
  
      w_ll = w_ll.unsqueeze(0).unsqueeze(1)
      w_lh = w_lh.unsqueeze(0).unsqueeze(1)
      w_hl = w_hl.unsqueeze(0).unsqueeze(1)
      w_hh = w_hh.unsqueeze(0).unsqueeze(1)
      filters = torch.cat([w_ll, w_lh, w_hl, w_hh], dim=0)
      self.register_buffer("filters", filters)
      self.filters = self.filters.to(dtype=torch.float16)
  
imports: import torch
  from torch import nn
  from torch.autograd import Function
  import pywt
  from functools import partial
label_desc: Use image node_id 1 to create a new IDWT2D object from inherited base classes: nn with example: obj = IDWT2D(wave)