import torch
X1 = torch.tensor([[0,0],[1,0],[0,1,],[1,1]] ,dtype = torch.float32)
torch.random.manual_seed(420)
output = torch.nn.Linear(2,1)
zhat = output(X1)
print(zhat)
print(output.weight)
print("*"*50)
print(output.bias)
torch.nn.Linear
最新推荐文章于 2024-09-20 22:08:40 发布