| 322 | |
| 323 | template <typename Store> |
| 324 | Conv1dWeights conv1d_from_source( |
| 325 | Store & store, |
| 326 | const assets::TensorSource & source, |
| 327 | const std::string & prefix, |
| 328 | assets::TensorStorageType storage_type, |
| 329 | int64_t out_channels, |
| 330 | int64_t in_channels, |
| 331 | int64_t kernel_size, |
| 332 | bool use_bias) { |
| 333 | Conv1dWeights weights; |
| 334 | weights.weight = store.load_tensor(source, prefix + ".weight", storage_type, {out_channels, in_channels, kernel_size}); |
| 335 | if (use_bias) { |
| 336 | weights.bias = store.load_f32_tensor(source, prefix + ".bias", {out_channels}); |
| 337 | } |
| 338 | return weights; |
| 339 | } |
| 340 | |
| 341 | template <typename Store> |
| 342 | Conv2dWeights conv2d_from_source( |
no test coverage detected