(self, num_channels: int, flip_sin_to_cos: bool, downscale_freq_shift: float, scale: int = 1)
| 1308 | |
| 1309 | class Timesteps(nn.Module): |
| 1310 | def __init__(self, num_channels: int, flip_sin_to_cos: bool, downscale_freq_shift: float, scale: int = 1): |
| 1311 | super().__init__() |
| 1312 | self.num_channels = num_channels |
| 1313 | self.flip_sin_to_cos = flip_sin_to_cos |
| 1314 | self.downscale_freq_shift = downscale_freq_shift |
| 1315 | self.scale = scale |
| 1316 | |
| 1317 | def forward(self, timesteps: torch.Tensor) -> torch.Tensor: |
| 1318 | t_emb = get_timestep_embedding( |
no outgoing calls
no test coverage detected