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