When implementing this CNN model for text classification 10, I’m running into this error:
RuntimeError: Expected tensor for argument #1 ‘input’ to have the same dimension as tensor for ‘result’; but 4 does not equal 2 (while checking arguments for cudnn_convolution)
Is this a bug in pytorch library?
In forward function, my x is 2D, so I do:
x = x.unsqueeze(0)
to make it 3D and anything else is the same as the example.