MCPcopy Create free account
hub / github.com/HobbitLong/PyContrast / __init__

Method __init__

pycontrast/networks/resnet_cmc.py:40–48  ·  view source on GitHub ↗
(self, inplanes, planes, stride=1, downsample=None)

Source from the content-addressed store, hash-verified

38 expansion = 1
39
40 def __init__(self, inplanes, planes, stride=1, downsample=None):
41 super(BasicBlock, self).__init__()
42 self.conv1 = conv3x3(inplanes, planes, stride)
43 self.bn1 = nn.BatchNorm2d(planes)
44 self.relu = nn.ReLU(inplace=True)
45 self.conv2 = conv3x3(planes, planes)
46 self.bn2 = nn.BatchNorm2d(planes)
47 self.downsample = downsample
48 self.stride = stride
49
50 def forward(self, x):
51 residual = x

Callers

nothing calls this directly

Calls 2

conv3x3Function · 0.70
__init__Method · 0.45

Tested by

no test coverage detected