@@ -132,10 +132,25 @@ def wavedec2(
132132 level : Optional [int ] = None ,
133133 axes : Tuple [int , int ] = (- 2 , - 1 ),
134134) -> List [Union [torch .Tensor , Tuple [torch .Tensor , torch .Tensor , torch .Tensor ]]]:
135- """Run a two-dimensional wavelet transformation.
135+ r """Run a two-dimensional wavelet transformation.
136136
137137 This function relies on two-dimensional convolutions.
138- We transform the last two axes by default.
138+ Outer products allow the construction of 2D-filters from 1D filter arrays
139+ :ref:`(see fwt-intro) <sec-fwt-2d>`.
140+ It transforms the last two axes by default.
141+ This function computes
142+
143+ .. math::
144+ \mathbf{x}_s *_2 \mathbf{h}_k = \mathbf{c}_{k, s+1}
145+
146+ with :math:`k \in [a, h, v, d]` and
147+ :math:`s \in \mathbb{N}_0` the set of natural numbers,
148+ where :math:`\mathbf{x}_0` is equal to
149+ the original input image :math:`\mathbf{X}`.
150+ :math:`*_2` indicates two dimensional-convolution.
151+ Computations at subsequent scales work exclusively with
152+ approximation coefficients :math:`c_{a, s}`
153+ as inputs. Setting the `level` argument allows choosing the largest scale.
139154
140155 Args:
141156 data (torch.Tensor): The input data tensor with any number of dimensions.
@@ -158,7 +173,7 @@ def wavedec2(
158173 list: A list containing the wavelet coefficients.
159174 The coefficients are in pywt order. That is::
160175
161- [cAn , (cHn, cVn, cDn ), … (cH1, cV1, cD1)] .
176+ [cAs , (cHs, cVs, cDs ), … (cH1, cV1, cD1)] .
162177
163178 A denotes approximation, H horizontal, V vertical
164179 and D diagonal coefficients.
@@ -230,11 +245,14 @@ def waverec2(
230245) -> torch .Tensor :
231246 """Reconstruct a signal from wavelet coefficients.
232247
248+ This function undoes the effect of the analysis
249+ or forward transform by running transposed convolutions.
250+
233251 Args:
234252 coeffs (list): The wavelet coefficient list produced by wavedec2.
235253 The coefficients must be in pywt order. That is::
236254
237- [cAn , (cHn, cVn, cDn ), … (cH1, cV1, cD1)] .
255+ [cAs , (cHs, cVs, cDs ), … (cH1, cV1, cD1)] .
238256
239257 A denotes approximation, H horizontal, V vertical,
240258 and D diagonal coefficients.
@@ -244,7 +262,8 @@ def waverec2(
244262 last two. Defaults to (-2, -1).
245263
246264 Returns:
247- torch.Tensor: The reconstructed signal of shape ``[batch, height, width]`` or
265+ torch.Tensor:
266+ The reconstructed signal of shape ``[batch, height, width]`` or
248267 ``[batch, channel, height, width]`` depending on the input to `wavedec2`.
249268
250269 Raises:
0 commit comments