MCPcopy Create free account
hub / github.com/thygate/stable-diffusion-webui-depthmap-script / __init__

Method __init__

lib/Resnext_torch.py:79–94  ·  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

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

Callers

nothing calls this directly

Calls 4

conv1x1Function · 0.85
norm_layerFunction · 0.85
conv3x3Function · 0.70
__init__Method · 0.45

Tested by

no test coverage detected