(self, x)
| 70 | self.stride = stride |
| 71 | |
| 72 | def forward(self, x): |
| 73 | residual = x |
| 74 | |
| 75 | out = self.conv1(x) |
| 76 | out = self.bn1(out) |
| 77 | out = self.relu(out) |
| 78 | |
| 79 | out = self.conv2(out) |
| 80 | out = self.bn2(out) |
| 81 | out = self.relu(out) |
| 82 | |
| 83 | out = self.conv3(out) |
| 84 | out = self.bn3(out) |
| 85 | |
| 86 | if self.downsample is not None: |
| 87 | residual = self.downsample(x) |
| 88 | |
| 89 | out += residual |
| 90 | out = self.relu(out) |
| 91 | |
| 92 | return out |
| 93 | |
| 94 | |
| 95 | class ResNet(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected