| 83 | } |
| 84 | |
| 85 | core::TensorValue require_tensor(const WavlmEncoderWeights & weights, const std::string & name) { |
| 86 | const auto it = weights.tensors.find(name); |
| 87 | if (it == weights.tensors.end()) { |
| 88 | throw std::runtime_error("WavLM missing tensor: " + name); |
| 89 | } |
| 90 | return it->second; |
| 91 | } |
| 92 | |
| 93 | NormWeights norm_weights(const WavlmEncoderWeights & weights, const std::string & prefix) { |
| 94 | return NormWeights{ |
no test coverage detected