Solved by Eta_C in post #2 
              
              
                I do not know your input shape, but you can try to rewrite 
self.convs = [nn.Conv2d(1,1,(i,1)) for i in range(1, self.max_conv_size+1)]

such as 
self.convs = nn.ModuleList([nn.Conv2d(1,1,(i,1)) for i in range(1, self.max_conv_size+1)])