(self, x, shift, scale)
| 183 | self.linear = nn.Linear(hidden_size, dim_w, bias=True) |
| 184 | |
| 185 | def framewise_modulate(self, x, shift, scale) -> torch.Tensor: |
| 186 | return x * (1 + scale) + shift |
| 187 | |
| 188 | def forward(self, x: torch.Tensor, c: torch.Tensor) -> torch.Tensor: |
| 189 | shift, scale = self.adaLN_modulation(c).chunk(2, dim=-1) |