MCPcopy Create free account
hub / github.com/AtlasAnalyticsLab/AdaFisher / __init__

Method __init__

Image_Classification/src/models/resnet.py:98–113  ·  view source on GitHub ↗
(self, inplanes, planes, stride=1, downsample=None, groups=1,
                 base_width=64, dilation=1, norm_layer=None)

Source from the content-addressed store, hash-verified

96 expansion = 4
97
98 def __init__(self, inplanes, planes, stride=1, downsample=None, groups=1,
99 base_width=64, dilation=1, norm_layer=None):
100 super(Bottleneck, self).__init__()
101 if norm_layer is None:
102 norm_layer = nn.BatchNorm2d
103 width = int(planes * (base_width / 64.)) * groups
104 # Both self.conv2 and self.downsample layers downsample the input when stride != 1
105 self.conv1 = conv1x1(inplanes, width)
106 self.bn1 = norm_layer(width)
107 self.conv2 = conv3x3(width, width, stride, groups, dilation)
108 self.bn2 = norm_layer(width)
109 self.conv3 = conv1x1(width, planes * self.expansion)
110 self.bn3 = norm_layer(planes * self.expansion)
111 self.relu = nn.ReLU(inplace=False)
112 self.downsample = downsample
113 self.stride = stride
114
115 def forward(self, x):
116 identity = x

Callers

nothing calls this directly

Calls 3

conv1x1Function · 0.85
conv3x3Function · 0.85
__init__Method · 0.45

Tested by

no test coverage detected