(self, in_channel, out_dim)
| 187 | """ |
| 188 | |
| 189 | def __init__(self, in_channel, out_dim): |
| 190 | super(FaceEncoder, self).__init__() |
| 191 | self.in_channel = in_channel |
| 192 | self.out_dim = out_dim |
| 193 | self.face_conv = nn.Sequential( |
| 194 | SameBlock2d(in_channel, 64, kernel_size=7, padding=3), |
| 195 | # # 64 → 32 |
| 196 | ResBlock2d(64, 64, kernel_size=3, padding=1), |
| 197 | DownBlock2d(64, 64, 3, 1), |
| 198 | SameBlock2d(64, 128), |
| 199 | # 32 → 16 |
| 200 | ResBlock2d(128, 128, kernel_size=3, padding=1), |
| 201 | DownBlock2d(128, 128, 3, 1), |
| 202 | SameBlock2d(128, 128), |
| 203 | # 16 → 8 |
| 204 | ResBlock2d(128, 128, kernel_size=3, padding=1), |
| 205 | DownBlock2d(128, 128, 3, 1), |
| 206 | SameBlock2d(128, 128), |
| 207 | # 8 → 4 |
| 208 | ResBlock2d(128, 128, kernel_size=3, padding=1), |
| 209 | DownBlock2d(128, 128, 3, 1), |
| 210 | SameBlock2d(128, 128), |
| 211 | # 4 → 2 |
| 212 | ResBlock2d(128, 128, kernel_size=3, padding=1), |
| 213 | DownBlock2d(128, 128, 3, 1), |
| 214 | SameBlock2d(128, out_dim, kernel_size=1, padding=0), |
| 215 | ) |
| 216 | |
| 217 | def forward(self, x): |
| 218 | ## b x c x h x w |
nothing calls this directly
no test coverage detected