PyTorch搭建神经网络中nn.BatchNorm2d()

nn.Conv2d(in_channel, out_channel, 3, stride, 1, bias=False),
nn.BatchNorm2d(out_channel),   #BatchNorm2d最常用于卷积网络中(防止梯度消失或爆炸),设置的参数就是卷积的输出通道数
nn.ReLU(inplace=True),

参考
https://www.cnblogs.com/yongjieShi/p/9332655.html

http://www.mamicode.com/info-detail-2378483.html

https://blog.csdn.net/qq_39938666/article/details/84992336

你可能感兴趣的:(PyTorch搭建神经网络中nn.BatchNorm2d())