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

Method forward

pycontrast/networks/resnet.py:106–126  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

104 self.stride = stride
105
106 def forward(self, x):
107 identity = x
108
109 out = self.conv1(x)
110 out = self.bn1(out)
111 out = self.relu(out)
112
113 out = self.conv2(out)
114 out = self.bn2(out)
115 out = self.relu(out)
116
117 out = self.conv3(out)
118 out = self.bn3(out)
119
120 if self.downsample is not None:
121 identity = self.downsample(x)
122
123 out += identity
124 out = self.relu(out)
125
126 return out
127
128
129class ResNet(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected