(self, inplanes, planes, stride=1, downsample=None, groups=1,
base_width=64, dilation=1, norm_layer=None)
| 77 | expansion = 4 |
| 78 | |
| 79 | def __init__(self, inplanes, planes, stride=1, downsample=None, groups=1, |
| 80 | base_width=64, dilation=1, norm_layer=None): |
| 81 | super(Bottleneck, self).__init__() |
| 82 | if norm_layer is None: |
| 83 | norm_layer = nn.BatchNorm2d |
| 84 | width = int(planes * (base_width / 64.)) * groups |
| 85 | # Both self.conv2 and self.downsample layers downsample the input when stride != 1 |
| 86 | self.conv1 = conv1x1(inplanes, width) |
| 87 | self.bn1 = norm_layer(width) |
| 88 | self.conv2 = conv3x3(width, width, stride, groups, dilation) |
| 89 | self.bn2 = norm_layer(width) |
| 90 | self.conv3 = conv1x1(width, planes * self.expansion) |
| 91 | self.bn3 = norm_layer(planes * self.expansion) |
| 92 | self.relu = nn.ReLU(inplace=True) |
| 93 | self.downsample = downsample |
| 94 | self.stride = stride |
| 95 | |
| 96 | def forward(self, x): |
| 97 | identity = x |
nothing calls this directly
no test coverage detected