-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feed forward layer, frontend and encoder #53
Conversation
x = x.transpose(1, 2) # torch 1d convolution is over last dim but we want time conv | ||
x = self.conv(x).transpose(1, 2) | ||
|
||
# these settings apparently apply stride correctly to the masking whatever the kernel size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# these settings apparently apply stride correctly to the masking whatever the kernel size | |
# change masking according to stride value |
do be confident about the implementation of others xP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I was not confident in my own implementation here. I had to choose kernel_size = 1
and padding = 0
to achieve correct masking, which is not how this function is supposed to be used I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And with kernel_size = cfg.window_size
and padding = get_same_padding(cfg.window_size)
(i.e. the values given to Conv1d
) it does not work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weirdly enough yes. I came up with a failing test case in a new branch
i6_models/tests/test_masking.py
Line 7 in 55a6fd6
def test_masking(): |
Co-authored-by: michelwi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only small comments regarding documentation, else looks good to me.
Co-authored-by: Benedikt Hilmes <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took the liberty to commit one last change :)
Implementation of a simple feed forward encoder that serves to generate good alignments in full-sum HMM training. Apart from the layers, it implements a simple convolutional front-end that acts as a feed-forward layer that takes a window of feature time frames into account.