Hi everone,
I using this code:
self.conv = nn.Conv1d(input_dim, output_dim, 1, 1)
but get the error:
RuntimeError: kernel size should be greater than zero, but got kH: 1 kW: 0 at /Users/soumith/code/builder/wheel/pytorch-src/torch/lib/THNN/generic/SpatialConvolutionMM.c:11
the strides has the same problem.
self.conv = nn.Conv1d(input_dim, output_dim, (1,1),(1,1))
is correct.
why did this case take place?In the document, the kernel_size and strides can use int or tuple.
Thanks for help
I find my input Dimension is error, if use Conv1D, the input shape must be 3D-Tensor (N,Cin,Lin)