(self, dim)
| 222 | # PositionalEncoding Source: https://github.com/lmnt-com/wavegrad/blob/master/src/wavegrad/model.py |
| 223 | class PositionalEncoding(nn.Module): |
| 224 | def __init__(self, dim): |
| 225 | super().__init__() |
| 226 | self.dim = dim |
| 227 | |
| 228 | def forward(self, noise_level): |
| 229 | count = self.dim // 2 |