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

Method __init__

lib/Resnet.py:58–69  ·  view source on GitHub ↗
(self, inplanes, planes, stride=1, downsample=None)

Source from the content-addressed store, hash-verified

56 expansion = 4
57
58 def __init__(self, inplanes, planes, stride=1, downsample=None):
59 super(Bottleneck, self).__init__()
60 self.conv1 = nn.Conv2d(inplanes, planes, kernel_size=1, bias=False)
61 self.bn1 = NN.BatchNorm2d(planes) #NN.BatchNorm2d
62 self.conv2 = nn.Conv2d(planes, planes, kernel_size=3, stride=stride,
63 padding=1, bias=False)
64 self.bn2 = NN.BatchNorm2d(planes) #NN.BatchNorm2d
65 self.conv3 = nn.Conv2d(planes, planes * self.expansion, kernel_size=1, bias=False)
66 self.bn3 = NN.BatchNorm2d(planes * self.expansion) #NN.BatchNorm2d
67 self.relu = nn.ReLU(inplace=True)
68 self.downsample = downsample
69 self.stride = stride
70
71 def forward(self, x):
72 residual = x

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected