(self, x)
| 34 | self.stride = stride |
| 35 | |
| 36 | def forward(self, x): |
| 37 | residual = x |
| 38 | |
| 39 | out = self.conv1(x) |
| 40 | out = self.bn1(out) |
| 41 | out = self.relu(out) |
| 42 | |
| 43 | out = self.conv2(out) |
| 44 | out = self.bn2(out) |
| 45 | |
| 46 | if self.downsample is not None: |
| 47 | residual = self.downsample(x) |
| 48 | |
| 49 | out += residual |
| 50 | out = self.relu(out) |
| 51 | |
| 52 | return out |
| 53 | |
| 54 | |
| 55 | class Bottleneck(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected