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

Method __init__

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

31 expansion = 1
32
33 def __init__(self, inplanes, planes, stride=1, downsample=None, groups=1,
34 base_width=64, dilation=1, norm_layer=None):
35 super(BasicBlock, self).__init__()
36 if norm_layer is None:
37 norm_layer = nn.BatchNorm2d
38 if groups != 1 or base_width != 64:
39 raise ValueError('BasicBlock only supports groups=1 and base_width=64')
40 if dilation > 1:
41 raise NotImplementedError("Dilation > 1 not supported in BasicBlock")
42 # Both self.conv1 and self.downsample layers downsample the input when stride != 1
43 self.conv1 = conv3x3(inplanes, planes, stride)
44 self.bn1 = norm_layer(planes)
45 self.relu = nn.ReLU(inplace=True)
46 self.conv2 = conv3x3(planes, planes)
47 self.bn2 = norm_layer(planes)
48 self.downsample = downsample
49 self.stride = stride
50
51 def forward(self, x):
52 identity = x

Callers

nothing calls this directly

Calls 3

norm_layerFunction · 0.85
conv3x3Function · 0.70
__init__Method · 0.45

Tested by

no test coverage detected