| 119 | } |
| 120 | if (total_freqs != config.stft_freq_bins) { |
| 121 | throw std::runtime_error( |
| 122 | "bs_roformer freqs_per_bands sum mismatch: expected " + |
| 123 | std::to_string(config.stft_freq_bins) + ", got " + |
| 124 | std::to_string(total_freqs)); |
| 125 | } |
| 126 | |
| 127 | config.num_bands = static_cast<int>(freqs_per_band.size()); |
| 128 | config.total_band_input_dim = 0; |
| 129 | config.band_input_dims.reserve(freqs_per_band.size()); |
| 130 | config.merged_freq_indices.reserve( |
| 131 | static_cast<size_t>(config.stft_freq_bins * config.channels)); |
| 132 | int64_t freq = 0; |
| 133 | for (const int64_t count : freqs_per_band) { |
no test coverage detected