(self, input, cond)
| 307 | nn.init.zeros_(self.mapper.bias) |
| 308 | |
| 309 | def forward(self, input, cond): |
| 310 | weight, bias = self.mapper(cond[self.cond_key]).chunk(2, dim=-1) |
| 311 | input = F.group_norm(input, self.num_groups, eps=self.eps) |
| 312 | return torch.addcmul(utils.append_dims(bias, input.ndim), input, utils.append_dims(weight, input.ndim) + 1) |
| 313 | |
| 314 | |
| 315 | # Attention |
nothing calls this directly
no outgoing calls
no test coverage detected