| 265 | return weights; |
| 266 | } |
| 267 | |
| 268 | ConvTranspose1dWeights load_conv_transpose( |
| 269 | core::BackendWeightStore & store, |
| 270 | const assets::TensorSource & source, |
| 271 | const std::string & prefix, |
| 272 | assets::TensorStorageType storage_type, |
| 273 | int64_t in_channels, |
| 274 | int64_t out_channels, |
| 275 | int64_t kernel, |
| 276 | int64_t stride, |
| 277 | bool use_bias = true) { |
| 278 | ConvTranspose1dWeights weights; |
| 279 | weights.in_channels = in_channels; |
| 280 | weights.out_channels = out_channels; |
| 281 | weights.kernel = kernel; |
| 282 | weights.stride = stride; |
| 283 | weights.use_bias = use_bias; |
| 284 | weights.weight = store.load_tensor(source, prefix + ".weight", storage_type, {in_channels, out_channels, kernel}); |
| 285 | if (use_bias) { |
| 286 | weights.bias = store.load_tensor(source, prefix + ".bias", assets::TensorStorageType::F32, {out_channels}); |
| 287 | } |
| 288 | return weights; |
| 289 | } |
| 290 | |
| 291 | LinearWeights load_linear( |
no test coverage detected