Torch Conv 1-D Layer outputs the same value repeated
I have a torch tensors of shape (768, 8, 22), procesed by a Conv Layer 1-D Layer. The data is already standarized. The tensor is processed by the next layer:
nn.Conv1d(input_chanels = 8, output_chanels = 1, kernel_size = 3)
The output of the layer has the right dimensions, but the output matrix has the same value repeated over and over again.
output = tensor(
          
         [[[-0.1856, -0.1856, -0.1856, -0.1856, -0.1856, -0.1856, -0.1856,
          -0.1856, -0.1856, -0.1856, -0.1856, -0.1856, -0.1856, -0.1856,
          -0.1856, -0.1856, -0.1856, -0.1856, -0.1856, -0.1856]],
          ...
          [[-0.1856, -0.1856, -0.1856, -0.1856, -0.1856, -0.1856, -0.1856,
          -0.1856, -0.1856, -0.1856, -0.1856, -0.1856, -0.1856, -0.1856,
          -0.1856, -0.1856, -0.1856, -0.1856, -0.1856, -0.1856]]]


I've solved this issue, it's a weird situation of torch. I just remove de Conv1dfrom the init from my network class and I defined in the forward method. By doing so, the output is no longer the same for every step.
