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