| 597 | auto std = source.require_f32("std", {whisper_dim}); |
| 598 | source.release_storage(); |
| 599 | return {std::move(mean), std::move(std)}; |
| 600 | } |
| 601 | |
| 602 | engine::modules::Conv1dWeights load_weight_norm_conv1d_weights( |
| 603 | engine::core::BackendWeightStore & store, |
| 604 | const engine::assets::TensorSource & source, |
| 605 | const std::string & prefix, |
| 606 | engine::assets::TensorStorageType storage_type, |
| 607 | int64_t out_channels, |
| 608 | int64_t in_channels, |
| 609 | int64_t kernel_size, |
| 610 | bool use_bias) { |
| 611 | engine::modules::Conv1dWeights weights; |
| 612 | weights.weight = store.make_from_f32( |
| 613 | engine::core::TensorShape::from_dims({out_channels, in_channels, kernel_size}), |
| 614 | storage_type, |
| 615 | effective_weight_norm_conv1d(source, prefix, out_channels, in_channels, kernel_size)); |
| 616 | if (use_bias) { |
| 617 | weights.bias = store.load_f32_tensor(source, prefix + ".bias", {out_channels}); |
| 618 | } |
| 619 | return weights; |
| 620 | } |
| 621 | |
| 622 | Vevo2CocoVocosEncoderWeights load_coco_vocos_encoder_weights( |
| 623 | engine::core::BackendWeightStore & store, |
| 624 | const engine::assets::TensorSource & source, |
| 625 | const Vevo2CocoTokenizerConfig & config, |
| 626 | engine::assets::TensorStorageType matmul_storage_type, |
| 627 | engine::assets::TensorStorageType conv_storage_type) { |
no test coverage detected