I got this error.
RuntimeError: shape '[-1, 12, 32]' is invalid for input of size 12
I modified a bit in the net.
class CNNnet(nn.Module):
    def __init__(self):
        super(CNNnet, self).__init__()  
        self.conv1 = nn.Conv1d(in_channels=1 , out_channels=8 ,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=8, out_channels=32 ,kernel_size=5, stride=1, padding = 2)# 36795
        self.relu = nn.ReLU()
        self.pool = nn.MaxPool1d(kernel_size = 2)
        
        self.fc1 = nn.Linear(32*8,256)
        self.dropout = nn.Dropout(p=0.5)
        self.fc2 = nn.Linear(256, 128)
        self.dropout = nn.Dropout(p=0.5)
        self.fc3 = nn.Linear(128, 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=  x.view(-1,32*8)
        x = self.fc1(x)
        x = self.dropout(x)
        x = self.fc2(x)
        x = self.dropout(x)
        x = self.fc3(x)
        return x