Assertion failure when using Conv1d

(Orpheon) #1

I was having issues using Conv1d for a sequence learning application because of an assertion error about tensor dimensions. So I tried making a minimal code example which fails with this error.

Am I doing something wrong or is this a bug? The dimension of the input is [batchsize, channels, data] < 4, and this fits with the documentation if I can read the equation right.

There is a previous post here [which I can’t link because newbie link limit] that mentions the same error for conv2d without batch_size, and a possible hack around it with unsqueeze, but this shouldn’t be necessary for conv1d with batch_size.


this should be fixed on the master branch of pytorch.
v0.1.11 releasing in 2 days will have this fix.