Here is what you might need.

  
      gist.github.com
  
  
    https://gist.github.com/InnovArul/7fd6898195c2951fb39e5a8398c2f588#file-1d_conv_experiment-py-L11-L21 233
1d_conv_experiment.py
import torch
import torch.nn as nn
import torch.nn.functional as F

class model(nn.Module):
    def __init__(self):
        super(model, self).__init__()
        self.conv1 = nn.Conv1d(9, 18, kernel_size=3) #9 input channels, 18 output channels
        self.conv2 = nn.Conv1d(18, 36, kernel_size=3) #18 input channels from previous Conv. layer, 36 out
        self.conv2_drop = nn.Dropout2d() #dropout
This file has been truncated. show original




  
  
    
    
  
  


Basically, the fc1 needs to take input of size 1044 and x.view should be applied to preserve batches.