MCPcopy Create free account
hub / github.com/FreeformRobotics/OTS / __init__

Method __init__

models/resnet.py:59–70  ·  view source on GitHub ↗
(self, inplanes, planes, stride=1, downsample=None)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected