文章目录
代码来自MXNET
ResNet
ResNet-18和ResNet-34使用的是Basic Block,而ResNet-50以及更深层的网络使用的是Bottleneck block

class BasicBlockV1b(HybridBlock):
"""ResNetV1b BasicBlockV1b
"""
expansion = 1
def __init__(self, planes, strides=1, dilation=1, downsample=None,
previous_dilation=1, norm_layer=None, norm_kwargs=None, **kwargs):
super(BasicBlockV1b, self).__init__()
norm_kwargs = norm_kwargs if norm_kwargs is not None else {
}
# first 3x3 conv
self.conv1 = nn.Conv2D(channels=planes, kernel_size=3, strides=strides,
padding=dilation, dilation=dilation, use_bias=False)
self.bn1 = norm_layer(in_channels=planes, **({
} if norm_kwargs is None else norm_kwargs))
self.relu1 = nn.Activation('relu')
# second 3x3 conv
self.conv2 = nn.Conv2D(channels=planes, kernel_size=3, strides=1,
padding=previous_dilation, dilation=previous_dilation,
use_bias=False)
self.bn2 = norm_layer(in_channels=planes, **({
} if norm_k

本文介绍了ResNet网络结构,包括其解决梯度消失问题的残差块设计。接着,讨论了ResNeXt如何通过组卷积在减少参数量的同时提升精度。最后,提到了wide-ResNet,它通过增加通道数来增强网络的表现能力。文章内容未完待续。
最低0.47元/天 解锁文章
2766

被折叠的 条评论
为什么被折叠?



