Unverified Commit 7c077f6a authored by Charles Pao's avatar Charles Pao Committed by GitHub
Browse files

add comments for the modified implementation of ResNet (#1983)


Co-authored-by: default avatarCharles Pao <dirtybluer@gmail.com>
parent 1e369d3a
......@@ -73,6 +73,12 @@ class BasicBlock(nn.Module):
class Bottleneck(nn.Module):
# Bottleneck in torchvision places the stride for downsampling at 3x3 convolution(self.conv2)
# while original implementation places the stride at the first 1x1 convolution(self.conv1)
# according to "Deep residual learning for image recognition"https://arxiv.org/abs/1512.03385.
# This variant is also known as ResNet V1.5 and improves accuracy according to
# https://ngc.nvidia.com/catalog/model-scripts/nvidia:resnet_50_v1_5_for_pytorch.
expansion = 4
def __init__(self, inplanes, planes, stride=1, downsample=None, groups=1,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment