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

Method forward

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

Source from the content-addressed store, hash-verified

62 self.downsample = downsample
63
64 def forward(self, x):
65 identity = x
66 if self.downsample is not None:
67 identity = self.downsample(x)
68
69 out = self.conv1(x)
70 out = self.bn1(out)
71 out = self.relu(out)
72
73 out = self.conv2(out)
74 out = self.bn2(out)
75 out = self.relu(out)
76
77 out = self.conv3(out)
78 out = self.bn3(out)
79
80 out += identity
81 out = self.relu(out)
82
83 return out
84
85class ResNet(nn.Module):
86 def __init__(self,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected