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

add conv4_stride to VGG4LayerActFrontendV1 #33

Closed
wants to merge 2 commits into from

Conversation

michelwi
Copy link
Contributor

As discussed in #17 (comment) we wanted to add stride parameter to (at least) the conv4 layer.

Do we want strides at the other layers, too?

@christophmluscher
Copy link
Contributor

This module does the striding via the pooling layers, not the convolutional layers.

We would need to discuss if this is a new module or the same... I find that there are already a lot of parameters here...

@michelwi
Copy link
Contributor Author

We would need to discuss if this is a new module or the same.

I had the impression it was intended to add down sampling also via conv layers..

I find that there are already a lot of parameters here...

that's an argument that we might as well add another one xP

@SimBe195
Copy link
Contributor

Imo pooling strides and conv strides are not really an "either-or" case, sometimes you might want to have both, e.g. conv strides over time-axis and pooling over feature-axis. So I would not create a new module for this. But for consistency I would add the config parameter for all of the conv layers, not just conv4.

@albertz
Copy link
Member

albertz commented Aug 28, 2023

Just as a reference, the implementation we have in RETURNN frontend (earlier RETURNN-common) (originally via @mmz33):
https://github.com/rwth-i6/returnn/blob/a8ffd0b734e0d7fc03a92575019253a31b50075a/returnn/frontend/encoder/conformer.py#L82

This can handle most of our older TF-based setups as well as ESPnet setups.

The strides of convolutions are configurable, and the strides of the poolings are just the same as the pool size (which are configurable) (which is the common case of pooling).

@christophmluscher
Copy link
Contributor

that's an argument that we might as well add another one xP

true

I had the impression it was intended to add down sampling also via conv layers..

I don't remember, but I am also fine with both

But for consistency I would add the config parameter for all of the conv layers, not just conv4.

I think this is a good point.

@christophmluscher
Copy link
Contributor

christophmluscher commented Oct 20, 2023

more generic and flexible frontend in PR #39

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.

None yet

4 participants