openspeech icon indicating copy to clipboard operation
openspeech copied to clipboard

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

Open OleguerCanal opened this issue 3 years ago • 1 comments

❓ 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?

OleguerCanal avatar May 16 '22 08:05 OleguerCanal

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.

sooftware avatar May 19 '22 02:05 sooftware