| 140 | weights.bias = store.load_f32_tensor(source, prefix + ".bias", {out_channels}); |
| 141 | } |
| 142 | return weights; |
| 143 | } |
| 144 | |
| 145 | HeartCodecPreluWeights load_prelu( |
| 146 | core::BackendWeightStore & store, |
| 147 | const assets::TensorSource & source, |
| 148 | const std::string & prefix) { |
| 149 | return {store.load_f32_tensor(source, prefix + ".weight", {1})}; |
| 150 | } |
| 151 | |
| 152 | HeartCodecProjectLayerWeights load_project_layer( |
| 153 | core::BackendWeightStore & store, |
| 154 | const assets::TensorSource & source, |
| 155 | const std::string & prefix, |
| 156 | assets::TensorStorageType storage_type, |
| 157 | int64_t in_channels, |
| 158 | int64_t out_channels) { |
| 159 | HeartCodecProjectLayerWeights weights; |
| 160 | weights.ffn_1 = binding::conv1d_from_source( |
no test coverage detected