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

Method forward

pycontrast/networks/resnet_cmc.py:50–66  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

48 self.stride = stride
49
50 def forward(self, x):
51 residual = x
52
53 out = self.conv1(x)
54 out = self.bn1(out)
55 out = self.relu(out)
56
57 out = self.conv2(out)
58 out = self.bn2(out)
59
60 if self.downsample is not None:
61 residual = self.downsample(x)
62
63 out += residual
64 out = self.relu(out)
65
66 return out
67
68
69class Bottleneck(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected