(self, x)
| 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 | |
| 129 | class ResNet(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected