I have time series data with sample dim of 1024x1 which one-dimensional input with 1024 length, I am trying to apply conv1d by specifying the number of input channels as 1 and the output channels as 5. while running I got an error, I think i miss understood something, I will be grateful for any help.

This is my layer architecture : self.feature_extractor = nn.Sequential(

#1024x1 —> 5x1024

nn.Conv1d(1, 5,3),

#5x1024----> 5x512

nn.MaxPool1d(2),

nn.ReLU(),

#5x512---->10x512

nn.Conv1d(5, 10, kernel_size=3, padding=1),

#10x512—>10x256

nn.MaxPool1d(2),

#10x512—>10x256

nn.Conv1d(10, 20, kernel_size=3,padding=1),

#20*256—>20*128

nn.MaxPool1d(2),

nn.Dropout2d(),

)

====

And here is the Error:

Expected 3-dimensional input for 3-dimensional weight [5, 1, 3], but got input of size [1024, 1] instead