(self, x)
| 211 | self.conv = nn.AvgPool2d(kernel_size=stride, stride=stride) |
| 212 | |
| 213 | def forward(self, x): |
| 214 | assert x.shape[-1] == self.channels |
| 215 | if self.use_conv and self.padding == 0: |
| 216 | pad = (0, 0, 0, 1, 0, 1) |
| 217 | x = F.pad(x, pad, mode="constant", value=0) |
| 218 | |
| 219 | assert x.shape[-1] == self.channels |
| 220 | # x = self.conv(x) |
| 221 | x = base_conv2d(x, self.conv, channel_last=True) |
| 222 | return x |
| 223 | |
| 224 | |
| 225 |
nothing calls this directly
no test coverage detected