为什么线性层输出结果为何不相等,是不是不需要纠结?

import torch
from torch import nn
torch.manual_seed(1)

X = torch.rand(2, 3, 4)
flatten=nn.Flatten()
X = flatten(X)
Y = X
print(‘X.shap’, X.shape)
layer=nn.Linear(12,2)
x = layer(X)
print(‘x:’, x)
net1 = nn.Sequential(nn.Linear(12, 2)
)
y = net1(Y)
print(‘y:’, y)