(self, x)
| 94 | self.stride = stride |
| 95 | |
| 96 | def forward(self, x): |
| 97 | identity = x |
| 98 | |
| 99 | out = self.conv1(x) |
| 100 | out = self.bn1(out) |
| 101 | out = self.relu(out) |
| 102 | |
| 103 | out = self.conv2(out) |
| 104 | out = self.bn2(out) |
| 105 | out = self.relu(out) |
| 106 | |
| 107 | out = self.conv3(out) |
| 108 | out = self.bn3(out) |
| 109 | |
| 110 | if self.downsample is not None: |
| 111 | identity = self.downsample(x) |
| 112 | |
| 113 | out += identity |
| 114 | out = self.relu(out) |
| 115 | |
| 116 | return out |
| 117 | |
| 118 | |
| 119 | class ResNet(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected