(self, num_downsampling)
| 172 | """Downsampling module for CGNet.""" |
| 173 | |
| 174 | def __init__(self, num_downsampling): |
| 175 | super(InputInjection, self).__init__() |
| 176 | self.pool = nn.ModuleList() |
| 177 | for i in range(num_downsampling): |
| 178 | self.pool.append(nn.AvgPool2d(3, stride=2, padding=1)) |
| 179 | |
| 180 | def forward(self, x): |
| 181 | for pool in self.pool: |