(self, n_f, stride)
| 53 | |
| 54 | class TPool(nn.Module): |
| 55 | def __init__(self, n_f, stride): |
| 56 | super().__init__() |
| 57 | self.stride = stride |
| 58 | self.conv = nn.Conv2d(n_f*stride, n_f, 1, bias=False) |
| 59 | def forward(self, x): |
| 60 | _NT, C, H, W = x.shape |
| 61 | return self.conv(x.reshape(-1, self.stride * C, H, W)) |