(max_freq=10.0)
| 76 | |
| 77 | |
| 78 | def freqs_pixel_log(max_freq=10.0): |
| 79 | def init(shape): |
| 80 | log_min = math.log(math.pi) |
| 81 | log_max = math.log(max_freq * math.pi / 2) |
| 82 | return torch.linspace(log_min, log_max, shape[-1]).expand(shape) |
| 83 | return init |
| 84 | |
| 85 | |
| 86 | class AxialRoPE(nn.Module): |