Model isn't learning with 1D CNN

username: ty.fu
cooked: <p>Hi,</p>
<p>I relatively new to deep learning and I am working on a task where I tried to adopt a CNN architecture to do some prediction. My input data is of size (32, 3, 8192) and my target is of size (32, 1, 4096). Both of (batch, channel, length). I have around 50,000 such samples.</p>
<p>The model isn’t learning very well. The loss plateaued after about 30 epochs. I have one example of prediction here. The target is at the top and the bottom is the prediction.</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/9/a/9ab635358ae09183784d82ae7c71636595fc7483.jpeg" data-download-href="https://discuss.pytorch.org/uploads/default/9ab635358ae09183784d82ae7c71636595fc7483" title="Screenshot 2025-09-11 at 4.03.33 PM"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/9/a/9ab635358ae09183784d82ae7c71636595fc7483_2_690x307.jpeg" alt="Screenshot 2025-09-11 at 4.03.33 PM" data-base62-sha1="m4DUm3tHNXUGHlEW14xvRAvVm39" width="690" height="307" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/9/a/9ab635358ae09183784d82ae7c71636595fc7483_2_690x307.jpeg, https://discuss.pytorch.org/uploads/default/optimized/3X/9/a/9ab635358ae09183784d82ae7c71636595fc7483_2_1035x460.jpeg 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/9/a/9ab635358ae09183784d82ae7c71636595fc7483_2_1380x614.jpeg 2x" data-dominant-color="FBFCFC"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screenshot 2025-09-11 at 4.03.33 PM</span><span class="informations">1882×840 84.5 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>I’m trying to understand why this is happening. Could the issue be with the data itself, where there may be no meaningful patterns to learn? Or is it related to a missing preprocessing step, an unsuitable architecture, or perhaps the choice of loss function (I used MSE)?</p>
<p>Any insights would be greatly appreciated</p>
<pre><code class="lang-auto">def __init__(
    self, 
    input_length: int = 8192,
    target_length: int = 4096,
    num_marks: int = 1,
    n_sequence_filters: int = 64,
    n_sequence_layers: int = 8
):
    self.input_length = input_length
    self.target_length = target_length
    self.num_marks = num_marks
    self.n_sequence_layers = n_sequence_layers
    self.iconv = nn.Conv1d(in_channels=num_marks, 
                           out_channels=n_sequence_filters, 
                           kernel_size=21, 
                           padding="same")
    self.irelu = nn.ReLU()
    self.rconvs = nn.ModuleList([nn.Conv1d(in_channels=n_sequence_filters, 
                                           out_channels=n_sequence_filters, 
                                           kernel_size=3, 
                                           padding=2**i, 
                                           dilation=2**i) for i in range(1, self.n_sequence_layers + 1)])
    self.rrelus = nn.ModuleList([nn.ReLU() for i in range(1, self.n_sequence_layers + 1)])
      
    self.fconv = nn.Conv1d(in_channels=n_sequence_filters, 
                           out_channels=1, 
                           kernel_size=1, 
                           padding="same")

def forward(mark: torch.Tensor) -&gt; torch.Tensor:  
  start = (self.input_length - self.target_length) // 2
  end = start + self.target_length
  
  X = mark
  X = self.iconv(X)
  for i in range(self.n_sequence_layers):
      X_conv = self.rrelus[i](self.rconvs[i](X))
      X = torch.add(X, X_conv)
  values = self.fconv(X)[:, :, start:end]
  
  return {
      "values": values
  }
</code></pre>