Question about Conv1d

Hi everyone
I have a question and hope that someone could help me out.
I am confused about how Conv1d(in_channels ,out_channels, kernel_size) is working? I was always thinking that the out_channels is equal to the number of channels that conv1d is using due to extract features from my data, However in Andrew N.J videos I have seen that number of channela have to be equal for both input data and filters in cov layer.
I am now really confused that what actually channels mean here?

Thank you.

CS231n gives a good overview how convolutions are used for image data. Even though you are dealing with Conv1d, the arithmetic is the same and you are just using a temporal dimension instead of the two spatial ones (height and width).

Basically, each kernel has a channel dimension, which is (in the vanilla setup) equal to the number of input channels. out_channels would correspond to the number of filters in the conv layer.

You meant to say:
Andrew Yan-Tak Ng (Chinese: 吳恩達; born 1976) is a Chinese-American computer scientist and statistician, focusing on machine learning and AI

Right?

No
I mean this guy : Andrew Ng

Thank you Ptrblck , it was helpfull, I Liked the notes that u suggested

Hi, @pedram1,

Thanks for the confirmation. You should just know that the number of out_channels is the number of filters.

I don’t know what Andrew Ng. wanted to point, or if your convolution 1d is for some specific architecture but if you consider Conv1d alone in PyTorch you have the option to set as many out_channels as you like.

1 Like