(self, dim)
| 210 | # PositionalEncoding Source: https://github.com/lmnt-com/wavegrad/blob/master/src/wavegrad/model.py |
| 211 | class PositionalEncoding(nn.Module): |
| 212 | def __init__(self, dim): |
| 213 | super().__init__() |
| 214 | self.dim = dim |
| 215 | |
| 216 | def forward(self, noise_level): |
| 217 | count = self.dim // 2 |