| 260 | } |
| 261 | |
| 262 | MioCodecConvTranspose1dWeights bind_conv_transpose1d( |
| 263 | const MioCodecWeights & weights, |
| 264 | const std::string & prefix, |
| 265 | int64_t in_channels, |
| 266 | int64_t out_channels, |
| 267 | int64_t kernel_size, |
| 268 | int stride = 1, |
| 269 | int padding = 0, |
| 270 | int dilation = 1, |
| 271 | bool use_bias = true) { |
| 272 | MioCodecConvTranspose1dWeights conv; |
| 273 | conv.config = { |
| 274 | in_channels, |
| 275 | out_channels, |
| 276 | kernel_size, |
| 277 | stride, |
| 278 | padding, |
| 279 | dilation, |
| 280 | use_bias, |
| 281 | }; |
| 282 | conv.weights.weight = require_loaded_tensor(weights, prefix + ".weight", {in_channels, out_channels, kernel_size}); |
| 283 | if (use_bias) { |
| 284 | conv.weights.bias = require_loaded_tensor(weights, prefix + ".bias", {out_channels}); |
| 285 | } |
| 286 | return conv; |
| 287 | } |
| 288 | |
| 289 | std::vector<float> fold_weight_norm( |
| 290 | const std::vector<float> & weight_g, |
no outgoing calls
no test coverage detected