(self, x)
| 69 | ) |
| 70 | |
| 71 | def forward(self, x): |
| 72 | if self.with_conv: |
| 73 | pad = (0, 1, 0, 1) |
| 74 | x = torch.nn.functional.pad(x, pad, mode="constant", value=0) |
| 75 | x = self.conv(x) |
| 76 | else: |
| 77 | x = torch.nn.functional.avg_pool2d(x, kernel_size=2, stride=2) |
| 78 | return x |
| 79 | |
| 80 | |
| 81 | class ResnetBlock(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected