Conv1d w/ Batch size 1: Input has less dimensions

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.

Using a batch size of 1 works for me. What are the settings you used for conv1d when you saw the error?