I have a question about smoothing 2D tensor with the conditions as below
input = (1, 10, 20)
Smoothing should be implemented along the sequence of length of 20 so that there are 10 individual smoothing operations. One more thing is to replicate the first and last values of a sequence (length of 20) like
For this, I tried to
input = torch.unsqueeze(input, dim=0)
out = nn.Conv1d(1, 1, kernel_size=(1, 3), padding=(0, 1), padding_mode=‘replicate’, bias=False)(input)
But it doesn’t work with some error.
It can be implemented in either inside of network or outside of network.
I need your help