PyTorch-Wavelet-Toolbox
PyTorch-Wavelet-Toolbox copied to clipboard
SWT: Make circular padding wrap more than once if needed
Some combinations of wavelets and number of decomposition steps cause the following RuntimeError: "Padding value causes wrapping around more than once".
If the padding values are greater than the input length, torch.nn.functional.pad does not wrap around more than once in circluar mode. We need to manually wrap around more than once, if needed. See feature request https://github.com/pytorch/pytorch/issues/57911 in PyTorch.