Hi,
I am using CNN 1d for my example and my data contain 12 columns and 36795 rows, Note: it is not an image it is data recorded from signals.
and I am facing this error I don’t understand the problem what exactly means. Could you explain that and suggest a solution for me.?
Thank you in advance.
My CNN model.
class CNNnet(nn.Module):
    def __init__(self):
        super(CNNnet, self).__init__()  
        self.conv1 = nn.Conv1d(in_channels=12 , out_channels=32 ,kernel_size=3, stride=1, padding = 1, bias=True)#
        self.relu = nn.ReLU()
        self.pool = nn.MaxPool1d(kernel_size = 2)
        self.conv2 = nn.Conv1d(in_channels=32, out_channels=64 ,kernel_size=3, stride=1, padding = 1)# 36795
        self.relu = nn.ReLU()
        self.pool = nn.MaxPool1d(kernel_size = 2)
        
        self.fc1 = nn.Linear(384, 192)
        self.dropout = nn.Dropout(p=0.5)
        self.fc2 = nn.Linear(192, 96)
        self.dropout = nn.Dropout(p=0.5)
        self.fc3 = nn.Linear(96, 8)

    def forward(self, x):  
        x = x.view(-1, 12, 32)
        x = self.conv1(x)
        x = self.relu(x)
        x = self.pool(x)
        x = self.conv2(x)
        x = self.relu(x)
        x = self.pool(x)
        
        x = self.fc1(x)
        x = self.dropout(x)
        x = self.fc2(x)
        x = self.dropout(x)
        x = self.fc3(x)
        return x

and the error is:
RuntimeError: size mismatch, m1: [64 x 8], m2: [384 x 192] at C:\w\1\s\tmp_conda_3.7_105232\conda\conda-bld\pytorch_1579085620499\work\aten\src\TH/generic/THTensorMath.cpp:136