You could e.g. append the forward activations to a list for the activation (or use any other workflow to store both activations):
activation = {}
def get_activation(name):
    def hook(model, input, output):
        if name in activation:
            activation[name].append(output.detach())
        else:
            activation[name] = [output.detach()]
    return hook


lin = nn.Linear(1, 1)
lin.register_forward_hook(get_activation('lin'))

out = lin(torch.randn(1, 1))
out = lin(torch.randn(1, 1))

print(activation)
> {'lin': [tensor([[0.4515]]), tensor([[0.5995]])]}