(self, x)
| 85 | padding=0) |
| 86 | |
| 87 | def forward(self, x): |
| 88 | if self.with_conv: |
| 89 | pad = (0,1,0,1) |
| 90 | x = torch.nn.functional.pad(x, pad, mode="constant", value=0) |
| 91 | x = self.conv(x) |
| 92 | else: |
| 93 | x = torch.nn.functional.avg_pool2d(x, kernel_size=2, stride=2) |
| 94 | return x |
| 95 | |
| 96 | |
| 97 | class ResnetBlock(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected