(self, x)
| 141 | return nn.Sequential(*layers) |
| 142 | |
| 143 | def forward(self, x): |
| 144 | x = self.relu1(self.bn1(self.conv1(x))) |
| 145 | x = self.relu2(self.bn2(self.conv2(x))) |
| 146 | x = self.relu3(self.bn3(self.conv3(x))) |
| 147 | x = self.maxpool(x) |
| 148 | |
| 149 | x = self.layer1(x) |
| 150 | x = self.layer2(x) |
| 151 | x = self.layer3(x) |
| 152 | x = self.layer4(x) |
| 153 | |
| 154 | x = self.avgpool(x) |
| 155 | x = x.view(x.size(0), -1) |
| 156 | x = self.fc(x) |
| 157 | |
| 158 | return x |
| 159 | |
| 160 | def resnet18(pretrained=False, **kwargs): |
| 161 | """Constructs a ResNet-18 model. |
nothing calls this directly
no outgoing calls
no test coverage detected