Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Axis support #67

Merged
merged 23 commits into from
Oct 12, 2023
Merged

Axis support #67

merged 23 commits into from
Oct 12, 2023

Conversation

loki-veera
Copy link
Collaborator

@loki-veera loki-veera commented Sep 22, 2023

Major changes:

  • Axes support for conv_transform in 1D, 2D and 3D along with corresponding tests

Breaking changes:

  • The new axis or axes argument appears before arguments related to boundary wavelet support. Pywt does not support boundary wavelets, so to respect pywt argument order we have added the new arguments before anything related to boundary wavelets. This makes it easy to migrate from pywt to ptwt and back. Unfortunately, this choice breaks calls to boundary wavelet arguments by order.
    To migrate call arguments related to boundary wavelets by name. This affects only matrix-fwt and wavelet-packet code that uses boundary wavelet support.

@v0lta
Copy link
Owner

v0lta commented Sep 22, 2023

TODO: Add the axis argument for the packets.

@v0lta v0lta self-assigned this Oct 2, 2023
@v0lta v0lta added the enhancement New feature or request label Oct 2, 2023
@v0lta
Copy link
Owner

v0lta commented Oct 2, 2023

Lets take this version for a test drive:

pip install git+ssh://[email protected]/v0lta/PyTorch-Wavelet-Toolbox.git@axis-support

Copy link
Owner

@v0lta v0lta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

src/ptwt/matmul_transform_2.py Show resolved Hide resolved
@@ -563,6 +568,7 @@ class MatrixWaverec2(object):
def __init__(
self,
wavelet: Union[Wavelet, str],
axes: Tuple[int, int] = (-2, -1),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking change. But okay since pywt uses this ordering.

src/ptwt/matmul_transform_3.py Show resolved Hide resolved
src/ptwt/packets.py Show resolved Hide resolved
@v0lta v0lta merged commit e6f9b5a into main Oct 12, 2023
7 checks passed
@v0lta v0lta deleted the axis-support branch October 12, 2023 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants