src/transformers/models/transfo_xl/modeling_transfo_xl.py/PositionalEmbedding/__init__
class PositionalEmbedding:    def __init__(self, demb):
        super().__init__()

        self.demb = demb

        inv_freq = 1 / (10000 ** (torch.arange(0.0, demb, 2.0) / demb))
        self.register_buffer("inv_freq", inv_freq)