(self, x)
| 62 | self.downsample = downsample |
| 63 | |
| 64 | def forward(self, x): |
| 65 | identity = x |
| 66 | if self.downsample is not None: |
| 67 | identity = self.downsample(x) |
| 68 | |
| 69 | out = self.conv1(x) |
| 70 | out = self.bn1(out) |
| 71 | out = self.relu(out) |
| 72 | |
| 73 | out = self.conv2(out) |
| 74 | out = self.bn2(out) |
| 75 | out = self.relu(out) |
| 76 | |
| 77 | out = self.conv3(out) |
| 78 | out = self.bn3(out) |
| 79 | |
| 80 | out += identity |
| 81 | out = self.relu(out) |
| 82 | |
| 83 | return out |
| 84 | |
| 85 | class ResNet(nn.Module): |
| 86 | def __init__(self, |
nothing calls this directly
no outgoing calls
no test coverage detected