| 283 | |
| 284 | |
| 285 | class ConstantInput(nn.Module): |
| 286 | def __init__(self, channel, size=4): |
| 287 | super().__init__() |
| 288 | |
| 289 | self.input = nn.Parameter(torch.randn(1, channel, size, size)) |
| 290 | |
| 291 | def forward(self, input): |
| 292 | batch = input.shape[0] |
| 293 | out = self.input.repeat(batch, 1, 1, 1) |
| 294 | |
| 295 | return out |
| 296 | |
| 297 | |
| 298 | class StyledConv(nn.Module): |