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

FasNet TAC integration #306

Merged
merged 66 commits into from
Feb 8, 2021
Merged

FasNet TAC integration #306

merged 66 commits into from
Feb 8, 2021

Conversation

popcornell
Copy link
Collaborator

@popcornell popcornell commented Nov 3, 2020

As the title implies. It was about time.

Doubts I have:

  1. where to put the model and its components (especially the NCC module probably is better to move it in dsp)
    (IMO in future we will have to refactor and re-organize the whole masknn ).
  2. the .pkl for the dataset generation should be moved elsewhere probably or fetched directly by cloning luo's repo.
  3. eval script missing right now (TODO)
  4. also docstrings (TODO)

@popcornell popcornell self-assigned this Nov 3, 2020
@popcornell popcornell added the enhancement New feature or request label Nov 3, 2020
@mpariente
Copy link
Collaborator

mpariente commented Nov 4, 2020

Cool, thanks !

IMO in future we will have to refactor and re-organize the whole masknn

Can you explain why, in your opinion, please?

  1. Tests missing (TODO)

@mpariente
Copy link
Collaborator

Another thing: I know that if we merge this without squashing, the binary files will be in the git history, even if removed from the PR. This would be problematic because they are quite heavy.

But, I'm not sure what happens if we squash. My intuition is that they won't be in history. I know @iver56 has some knowledge about this, do you know about this particular case?

@iver56
Copy link
Contributor

iver56 commented Nov 4, 2020

Another thing: I know that if we merge this without squashing, the binary files will be in the git history, even if removed from the PR. This would be problematic because they are quite heavy.

But, I'm not sure what happens if we squash. My intuition is that they won't be in history. I know @iver56 has some knowledge about this, do you know about this particular case?

I'm not an expert on this topic, but I think if you squash the commits (where one of them added a file and a later one removed it again), the squashed commit does not include the file. So I think if you include only the squashed commit, and discard the original, offending commits, the repository won't contain the big file. Maybe git gc is needed for pruning loose objects. You can check the repository size at https://api.github.com/repos/mpariente/asteroid

@mpariente
Copy link
Collaborator

Thanks a lot for the feedback and resources Iver !

@popcornell
Copy link
Collaborator Author

Your call really IMO if we squash there should not be in the history as long as I remove them. If we wanna be sure i can make another pull request.

Sure, IMO we have to be more modular and distinguish between models and building blocks.
For example: in attention.py there is DPTNet and is imported and wrapped in models.
I think in attention.py only building blocks should be included. And i would rename masknn to nnet or blocks or smthing like that.
I would put both DPTNet and DPTAsNet in models.

@mpariente
Copy link
Collaborator

Your call really IMO if we squash there should not be in the history as long as I remove them. If we wanna be sure i can make another pull request.

Let's keep it that way. I think it'll be ok.

You say that mask nets should be considered as models, it makes sense.
I don't have a clear idea of how to organize it better, or why it is currently limiting. I'm happy to discuss about that.

Copy link
Collaborator

@JorisCos JorisCos left a comment

Choose a reason for hiding this comment

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

Thanks for the PR ! Looks great ! I will take a look again once everything is added :)

asteroid/masknn/tac.py Outdated Show resolved Hide resolved
@popcornell
Copy link
Collaborator Author

What do you think about the NCC module we move it to DSP ?

@JorisCos
Copy link
Collaborator

JorisCos commented Nov 4, 2020

What do you think about the NCC module we move it to DSP ?

IMO yes

@popcornell
Copy link
Collaborator Author

Also keep in mind this is the first step towards Multi-Channel support so we may want also to start to think about how to organize the toolkit also to support multi-channel separation and enhancement algorithms and building blocks.

@mpariente mpariente mentioned this pull request Nov 4, 2020
3 tasks
@mpariente
Copy link
Collaborator

@popcornell do you feel like writing simple docstrings on the parts in the source code? Reviewing will be easier from there.

@popcornell
Copy link
Collaborator Author

Yes but i have limited time available this week

asteroid/models/fasnet.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@mpariente mpariente left a comment

Choose a reason for hiding this comment

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

We can almost merge. Things to sort out before:

  • Location of TACDataset
  • Clarification on the config etc..
  • Rebase for the multichannel support, and tests serialization.
  • Test the broadcasting of xcorr.

@mpariente
Copy link
Collaborator

\rebase

@mpariente
Copy link
Collaborator

/rebase

@mpariente
Copy link
Collaborator

Also, the model currently only supports 3D inputs, which won't work with inference.
I don't know what to do about that.
In BaseEncoderMaskerDecoder, we have these three funcs to handle input shapes in a jitable way, should we also integrate in FasNetTAC?
IMO, we can merge like this now and see if somebody can work on the jitability afterwards, maybe then, move these shape related stuff into BaseModel which can be useful in other models.

@mpariente
Copy link
Collaborator

I think there is a confusion in the enc_dim and feature_dim because if I change one without the other, the forward doesn't work.

@mpariente
Copy link
Collaborator

Great, the problem seems to be solved for feature_dim, there is still a problem with enc_dim though..

@popcornell
Copy link
Collaborator Author

popcornell commented Feb 8, 2021

Now should be solved. I extended the test also

@mpariente
Copy link
Collaborator

GREAT !

@mpariente mpariente merged commit 210b5e4 into master Feb 8, 2021
@mpariente mpariente deleted the fasnet_tac branch February 8, 2021 18:27
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.

4 participants