pytorch中nn.linear

一般定义一个linear层的时候,写法为nn.linear(in_features,out_features)
具体形式为:
y=wx+b
weight=Parameter(torch.Tensor(out_features,in_features))
bias=Parameter(torch.Tensor(out_features))

猜你喜欢

转载自blog.csdn.net/haoshan4783/article/details/88803737