(x)
| 258 | def forward(self, x): |
| 259 | """Forward function.""" |
| 260 | def _inner_forward(x): |
| 261 | identity = x |
| 262 | out = self.conv1(x) |
| 263 | out = self.norm1(out) |
| 264 | out = self.relu(out) |
| 265 | |
| 266 | if self.with_plugins: |
| 267 | out = self.forward_plugin(out, self.after_conv1_plugin_names) |
| 268 | |
| 269 | out = self.conv2(out) |
| 270 | out = self.norm2(out) |
| 271 | out = self.relu(out) |
| 272 | |
| 273 | if self.with_plugins: |
| 274 | out = self.forward_plugin(out, self.after_conv2_plugin_names) |
| 275 | |
| 276 | out = self.conv3(out) |
| 277 | out = self.norm3(out) |
| 278 | |
| 279 | if self.with_plugins: |
| 280 | out = self.forward_plugin(out, self.after_conv3_plugin_names) |
| 281 | |
| 282 | if self.downsample is not None: |
| 283 | identity = self.downsample(x) |
| 284 | |
| 285 | out += identity |
| 286 | |
| 287 | return out |
| 288 | |
| 289 | if self.with_cp and x.requires_grad: |
| 290 | out = cp.checkpoint(_inner_forward, x) |
nothing calls this directly
no test coverage detected