(self, channels, use_conv, dims=2)
| 89 | """ |
| 90 | |
| 91 | def __init__(self, channels, use_conv, dims=2): |
| 92 | super().__init__() |
| 93 | self.channels = channels |
| 94 | self.use_conv = use_conv |
| 95 | self.dims = dims |
| 96 | stride = 2 if dims != 3 else (1, 2, 2) |
| 97 | if use_conv: |
| 98 | self.op = conv_nd(dims, channels, channels, 3, stride=stride, padding=1) |
| 99 | else: |
| 100 | self.op = avg_pool_nd(stride) |
| 101 | |
| 102 | def forward(self, x): |
| 103 | assert x.shape[1] == self.channels |
nothing calls this directly
no test coverage detected