Hi,
I want to replicate this dilated causal convolution:
image765×40 8.44 KB
m being some different categories, k being time steps and 4 the channels.
I defined the convolutional layer like this:
nn.Conv1d(in_channels=4, out_channels=8, kernel_size=(1,3), stride=1, padding=2, dilation=1)
given m=3 and k=5 it gives me the following error:
RuntimeError: Expected 4-dimensional input for 4-dimensional weight [8, 4, 1, 3], but got 3-dimensional input of size [3, 4, 5] instead
If I change the Kernel size to 1 I get an output with the wrong shape:
torch.Size([3, 8, 9])
and if I set the kernel to 3 the output as the shape:
torch.Size([3, 8, 7])
But it has never the output shape [3, 5, 8.]
Am I missing something here?