original_docstring:  Forward pass of the DWT.
  
          Args:
              x (tensor): Input of shape :math:`(N, C_{in}, H_{in}, W_{in})`
  
          Returns:
              (yl, yh)
                  tuple of lowpass (yl) and bandpass (yh) coefficients.
                  yh is a list of length J with the first entry
                  being the finest scale coefficients. yl has shape
                  :math:`(N, C_{in}, H_{in}', W_{in}')` and yh has shape
                  :math:`list(N, C_{in}, 3, H_{in}'', W_{in}'')`. The new
                  dimension in yh iterates over the LH, HL and HH coefficients.
  
          Note:
              :math:`H_{in}', W_{in}', H_{in}'', W_{in}''` denote the correctly
              downsampled shapes of the DWT pyramid.
          
docstring: Forward pass of the DWT.
docstring_tokens: Forward pass of the DWT .
code: def forward(self, x):
          """ Forward pass of the DWT.
  
          Args:
              x (tensor): Input of shape :math:`(N, C_{in}, H_{in}, W_{in})`
  
          Returns:
              (yl, yh)
                  tuple of lowpass (yl) and bandpass (yh) coefficients.
                  yh is a list of length J with the first entry
                  being the finest scale coefficients. yl has shape
                  :math:`(N, C_{in}, H_{in}', W_{in}')` and yh has shape
                  :math:`list(N, C_{in}, 3, H_{in}'', W_{in}'')`. The new
                  dimension in yh iterates over the LH, HL and HH coefficients.
  
          Note:
              :math:`H_{in}', W_{in}', H_{in}'', W_{in}''` denote the correctly
              downsampled shapes of the DWT pyramid.
          """
          yh = ()
          ll = x
          mode = lowlevel.mode_to_int(self.mode)
  
          h1 = low_to_high(self.h0)
          h0_col = self.h0.reshape((1, 1, -1, 1))
          h1_col = h1.reshape((1, 1, -1, 1))
          h0_row = self.h0.reshape((1, 1, 1, -1))
          h1_row = h1.reshape((1, 1, 1, -1))
  
          # Do a multilevel transform
          for j in range(self.J):
              # Do 1 level of the transform
              ll, high = lowlevel.AFB2D.forward(
                  ll, h0_col, h1_col, h0_row, h1_row, mode)
              yh += (high,)
  
          return (ll,) + yh
code_tokens: def forward ( self , x ) : yh = ( ) ll = x mode = lowlevel . mode_to_int ( self . mode ) h1 = low_to_high ( self . h0 ) h0_col = self . h0 . reshape ( ( 1 , 1 , - 1 , 1 ) ) h1_col = h1 . reshape ( ( 1 , 1 , - 1 , 1 ) ) h0_row = self . h0 . reshape ( ( 1 , 1 , 1 , - 1 ) ) h1_row = h1 . reshape ( ( 1 , 1 , 1 , - 1 ) ) for j in range ( self . J ) : ll , high = lowlevel . AFB2D . forward ( ll , h0_col , h1_col , h0_row , h1_row , mode ) yh += ( high , ) return ( ll , ) + yh
short_docstring: Forward pass of the DWT.
short_docstring_tokens: Forward pass of the DWT .
comment: """ Forward pass of the DWT.
  
          Args:
              x (tensor): Input of shape :math:`(N, C_{in}, H_{in}, W_{in})`
  
          Returns:
              (yl, yh)
                  tuple of lowpass (yl) and bandpass (yh) coefficients.
                  yh is a list of length J with the first entry
                  being the finest scale coefficients. yl has shape
                  :math:`(N, C_{in}, H_{in}', W_{in}')` and yh has shape
                  :math:`list(N, C_{in}, 3, H_{in}'', W_{in}'')`. The new
                  dimension in yh iterates over the LH, HL and HH coefficients.
  
          Note:
              :math:`H_{in}', W_{in}', H_{in}'', W_{in}''` denote the correctly
              downsampled shapes of the DWT pyramid.
          """$SEP$# Do a multilevel transform$SEP$# Do 1 level of the transform