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

Isn't Conv1D with kernel=1 the same as Linear layer but slower? #163

Open
OleguerCanal opened this issue May 16, 2022 · 1 comment
Open

Comments

@OleguerCanal
Copy link

OleguerCanal commented May 16, 2022

❓ Questions & Help

I was wandering whether it makes sense from an efficiency point of view to change the Conv1D layer with kernel 1 from the conformer encoder to standard linear layers.
As I understand the operation is the same and a linear layer is ~10x faster.

Am I correct or am I missing something?

@sooftware
Copy link
Member

Thank you for the good points!
I looked it up, too. Please refer to https://stackoverflow.com/questions/55576314/conv1d-with-kernel-size-1-vs-linear-layer.

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

No branches or pull requests

2 participants