torch.nn.Linear和torch.nn.MSELoss

1.torch.nn.Linear------计算y=ax+b

in_features为输入维度

out_features为输出维度

bias为b的值

2.torch.nn.MSELoss

size_average为是最后loss加起来过后是否除以N

reduce----因为loss为张量,reduce为true表示将所有的lossi累加达到降维的目的

猜你喜欢

转载自blog.csdn.net/luoshiyong123/article/details/107728922