| 75 | |
| 76 | template <typename SUBNET> |
| 77 | void setup(const SUBNET& sub) { |
| 78 | // Precompute the rotation angles and their trigonometric values |
| 79 | seq_len = sub.get_output().nr(); |
| 80 | d_head = sub.get_output().nc(); |
| 81 | compute_rotation_angles(); |
| 82 | precompute_trigonometric_values(); |
| 83 | } |
| 84 | |
| 85 | template <typename SUBNET> |
| 86 | void forward(const SUBNET& sub, resizable_tensor& output) { |