MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / make_backend_conv

Function make_backend_conv

src/models/citrinet_asr/runtime.cpp:108–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108BackendConv1dWeights 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
131std::vector<float> read_f32_tensor_values(
132 const assets::TensorSource & source,

Callers 1

load_backend_weightsFunction · 0.70

Calls 2

load_f32_tensorMethod · 0.80
store_weightFunction · 0.70

Tested by

no test coverage detected