| 119 | weights.bias = store.load_f32_tensor(source, prefix + ".bias", {out_channels}); |
| 120 | } |
| 121 | return weights; |
| 122 | } |
| 123 | |
| 124 | modules::ConvTranspose1dWeights load_weight_norm_conv_transpose1d( |
| 125 | core::BackendWeightStore & store, |
| 126 | const assets::TensorSource & source, |
| 127 | const std::string & prefix, |
| 128 | assets::TensorStorageType storage_type, |
| 129 | int64_t in_channels, |
| 130 | int64_t out_channels, |
| 131 | int64_t kernel_size, |
| 132 | bool use_bias = true) { |
| 133 | modules::ConvTranspose1dWeights weights; |
| 134 | const auto shape = core::TensorShape::from_dims({in_channels, out_channels, kernel_size}); |
| 135 | weights.weight = store.make_from_f32( |
| 136 | shape, |
| 137 | storage_type, |
| 138 | effective_weight_norm_dim0(source, prefix, {in_channels, out_channels, kernel_size})); |
| 139 | if (use_bias) { |
| 140 | weights.bias = store.load_f32_tensor(source, prefix + ".bias", {out_channels}); |
| 141 | } |
| 142 | return weights; |
| 143 | } |
no test coverage detected