When setting all seeds manually, I would expect that all new layers of a given type have the same initial weights. However, that is not the case.
import torch
from torch import nn
import os
import numpy as np
import random

torch.manual_seed(3)
torch.cuda.manual_seed_all(3)
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False
np.random.seed(3)
random.seed(3)
os.environ['PYTHONHASHSEED'] = str(3)

linear = nn.Linear(5, 2)
linear2 = nn.Linear(5, 2)

print(linear.weight)
print(linear2.weight)

This will print:
Parameter containing:
tensor([[ 0.2083, -0.4267, -0.2550,  0.4328, -0.1910],
        [ 0.1918,  0.1967, -0.3020, -0.1627, -0.1698]], requires_grad=True)
Parameter containing:
tensor([[-0.0255, -0.1283,  0.3900, -0.0621, -0.3761],
        [ 0.1991,  0.3531, -0.1468, -0.1808,  0.4017]], requires_grad=True)

Since the initialization of Linear is equal for all, and random effects have been removed by manually setting the seed, how then do the weights differ? And what is the reasoning for them being different?