(self, low_x, high_x)
| 156 | self.init_params() |
| 157 | |
| 158 | def forward(self, low_x, high_x): |
| 159 | n, c, _, _ = low_x.size() |
| 160 | x = torch.cat([low_x, high_x], 1) |
| 161 | x = self.avg_pool(x) |
| 162 | x = x.view(n, -1) |
| 163 | x = self.fc(x).view(n, c, 1, 1) |
| 164 | x = low_x * x + high_x |
| 165 | |
| 166 | return x |
| 167 | |
| 168 | def init_params(self): |
| 169 | for m in self.modules(): |