(self, x)
| 255 | self.stride = stride |
| 256 | |
| 257 | def forward(self, x): |
| 258 | residual = x |
| 259 | |
| 260 | out = self.conv1(x) |
| 261 | out = self.bn1(out) |
| 262 | out = self.relu(out) |
| 263 | |
| 264 | out = self.conv2(out) |
| 265 | out = self.bn2(out) |
| 266 | out = self.relu(out) |
| 267 | |
| 268 | out = self.conv3(out) |
| 269 | out = self.bn3(out) |
| 270 | out = self.se(out) |
| 271 | |
| 272 | if self.downsample is not None: |
| 273 | residual = self.downsample(x) |
| 274 | |
| 275 | out += residual |
| 276 | out = self.relu(out) |
| 277 | |
| 278 | return out |
| 279 | |
| 280 | |
| 281 | class ResNet(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected