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

ENH MuReNNDirect.to_conv1d() #56

Merged
merged 19 commits into from
Jul 25, 2024
Merged

ENH MuReNNDirect.to_conv1d() #56

merged 19 commits into from
Jul 25, 2024

Conversation

xir4n
Copy link
Collaborator

@xir4n xir4n commented Jul 23, 2024

What's Changed:

  1. Added a new feature to_conv1d as described in MuReNNDirect.to_conv1d() #45.
  2. MuReNNDirect now supports a variable number of Conv1d filters per scale. To specify the number of filters for each scale, use a list or dictionary instead of an integer.
  3. The Conv1d kernel sizes in MuReNNDirect are no longer equal to the T; they are now equal to T * Q[j] where Q[j] is the number of filters per octave at octave j.
  4. Added J_phi to specify the number of levels of downsampling in MuReNNDirect.
  5. The output tensor shape of MuReNNDirect has been changed from a 5-dimensional tensor with shape (B, C, Q, J, T) to a 4-dimensional tensor with shape (B, C, sum(Q_j), T//2**J_phi). This is a breaking change.
  6. alternate_gh is now false

xir4n added 14 commits June 10, 2024 12:31
commit bb7241cd6e9668bd545bd4218ef60efb3a225746
Author: Xiran <[email protected]>
Date:   Tue Jul 23 09:37:35 2024 +0200

    enable gpu

commit ef89866
Author: Xiran <[email protected]>
Date:   Wed Jun 26 23:19:54 2024 +0200

    FEAT nb of conv1d filters per scale

commit d824ad9
Author: Xiran <[email protected]>
Date:   Sun Jun 23 23:11:50 2024 +0200

    complex conv1d-->real conv1d
@lostanlen
Copy link
Contributor

Another breaking change is that MuReNNDirect now uses alternate_gh=False. @xir4n says it's better-conditioned in terms of frame bounds, particularly when the input length is not a power of two.

Copy link
Contributor

@lostanlen lostanlen left a comment

Choose a reason for hiding this comment

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

👏🏻 👏🏻 👏🏻 👏🏻 👏🏻

self.C = in_channels
if isinstance(Q, int):
self.Q = [Q for j in range(J)]
elif isinstance(Q, (dict, list)):
Copy link
Contributor

Choose a reason for hiding this comment

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

i think supporting dict is not necessary. list is sufficient

[3, 4, 5, 2] is more explicit than {0: 3, 1: 3, 3: 5, 4: 2}

murenn/dtcwt/nn.py Outdated Show resolved Hide resolved
murenn/dtcwt/nn.py Outdated Show resolved Hide resolved
@xir4n xir4n requested a review from lostanlen July 23, 2024 15:50
@xir4n
Copy link
Collaborator Author

xir4n commented Jul 23, 2024

remove properties, conflict revolved

@lostanlen lostanlen changed the title ENH to_conv1d() ENH MuReNNDirect.to_conv1d() Jul 25, 2024
Copy link
Contributor

@lostanlen lostanlen left a comment

Choose a reason for hiding this comment

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

Excellent work.

This will require detailed release notes !

@lostanlen lostanlen merged commit e1b890e into main Jul 25, 2024
3 checks passed
@xir4n xir4n deleted the complex_toconv1d branch August 18, 2024 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants