| 106 | } |
| 107 | |
| 108 | BackendConv1dWeights make_backend_conv( |
| 109 | core::BackendWeightStore & store, |
| 110 | const assets::TensorSource & source, |
| 111 | const Conv1dWeights & conv, |
| 112 | assets::TensorStorageType storage_type) { |
| 113 | BackendConv1dWeights weights; |
| 114 | weights.in_channels = conv.in_channels; |
| 115 | weights.out_channels = conv.out_channels; |
| 116 | weights.kernel = conv.kernel; |
| 117 | weights.stride = conv.stride; |
| 118 | weights.dilation = conv.dilation; |
| 119 | weights.padding = conv.padding; |
| 120 | weights.groups = conv.groups; |
| 121 | weights.use_bias = conv.use_bias; |
| 122 | weights.conv.weight = store_weight(store, source, conv, storage_type); |
| 123 | if (conv.use_bias) { |
| 124 | weights.conv.bias = store.load_f32_tensor(source, *conv.bias_name, {conv.out_channels}); |
| 125 | } |
| 126 | weights.depthwise.weight = weights.conv.weight; |
| 127 | weights.depthwise.bias = weights.conv.bias; |
| 128 | return weights; |
| 129 | } |
| 130 | |
| 131 | std::vector<float> read_f32_tensor_values( |
| 132 | const assets::TensorSource & source, |
no test coverage detected