Add redundancy to neural network

How do I make my neural network learn same pattern multiple times, that is one neural network learns minor modifications of the same pattern, and stores them in a list, and returns this list to another neural network?

if I do something like this,

class Model(nn.Module):
  def __init__(self):
    self.lin = nn.Linear(3, 3)
  def forward(self, x):
    out = self.lin(x)
    return out, out

then it would return two outputs, but both of them would be same, I want redundancy, but not exactly same patterns, only minor modifications.

I’m not sure why you are trying to do, because there might be a better way to achieve the desired output. However, one way to achieve ‘minor’ modifications is by adding some random noise(possibly Gaussian) to X in the forward() method call.