| 100 | }; |
| 101 | |
| 102 | Conv1dLayer load_conv( |
| 103 | core::BackendWeightStore & store, |
| 104 | const engine::assets::TensorSource & source, |
| 105 | const std::string & weight_name, |
| 106 | const std::string & bias_name, |
| 107 | int64_t out_channels, |
| 108 | int64_t in_channels, |
| 109 | int64_t kernel) { |
| 110 | Conv1dLayer layer; |
| 111 | layer.out_channels = out_channels; |
| 112 | layer.in_channels = in_channels; |
| 113 | layer.kernel = kernel; |
| 114 | layer.conv.weight = store.load_f32_tensor(source, weight_name, {out_channels, in_channels, kernel}); |
| 115 | if (!bias_name.empty()) { |
| 116 | layer.conv.bias = store.load_f32_tensor(source, bias_name, {out_channels}); |
| 117 | } |
| 118 | return layer; |
| 119 | } |
| 120 | |
| 121 | ActivationParams load_activation( |
| 122 | core::BackendWeightStore & store, |
no test coverage detected