Difference between nn.Linear and nn.Conv1d

I think Linear and Conv1d these two layers performs similarly when doing pointwise convolution, so what is the difference between these two layers and how can I choose which one to use ?

when num_channel=1, kernel=1, strider=1, padding=1 then they are the same

As far i know …when you have to preserve the spatial information like in the semantic segmentation…use convolution. And when you need not to do anything related to spatial information like in basic classification(mnist,cat dog classifier) go with Linear layers.

Do note that Linear is faster…