Basically the problem I noticed is when using the Conv1d as the first layer I feed the data in the form:
(batch_size, in_channels, size)
And this works fine for training but when I was validating I needed to feed the data one sample at a time (because the validation process is a little complicated) and started getting the error
RuntimeError: input has less dimensions than expected
After a while I figured out that if I pad the input with zeros (make the batch_size = 2 or something) the error goes away. This is kind of annoying and I think should be fixed in the Pytorch source, so I am posting just so that people know about this problem as well as the hack to work around it.