Here is a small example:
class MyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.lin1 = nn.Linear(10, 10)
        self.lin2 = nn.Linear(10, 10)
        
    def forward(self, x):
        out = self.lin1(x)
        # manipulate activation
        out = torch.cat((
            out[:, 0:1] + 1.,
            out[:, 1:] + 2.), dim=1)
        out = self.lin2(out)
        return out

model = MyModel()
x = torch.randn(1, 10)
out = model(x)