MCPcopy Create free account
hub / github.com/Sirwenhao/Deep-Learning-Notes / forward

Method forward

CV/Pytorch_classification/ResNet/model.py:23–38  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

21 self.downsample = downsample
22
23 def forward(self, x):
24 identity = x
25 if self.downsample is not None:
26 identity = self.downsample(x)
27
28 out = self.conv1(x)
29 out = self.bn1(out)
30 out = self.relu(out)
31
32 out = self.conv2(out)
33 out = self.bn2(out)
34
35 out += identity
36 out = self.relu(out)
37
38 return out
39
40class Bottleneck(nn.Module):
41 expansion = 4

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected