(self, x)
| 43 | ) |
| 44 | |
| 45 | def forward(self, x): |
| 46 | if self.with_conv: |
| 47 | pad = (0, 1, 0, 1) |
| 48 | x = torch.nn.functional.pad(x, pad, mode="constant", value=0) |
| 49 | x = self.conv(x) |
| 50 | else: |
| 51 | x = torch.nn.functional.avg_pool2d(x, kernel_size=2, stride=2) |
| 52 | return x |
| 53 | |
| 54 | |
| 55 | class ResnetBlock(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected