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

Function bind_linear

src/models/miocodec/weights.cpp:177–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177MioCodecLinearWeights bind_linear(
178 const MioCodecWeights & weights,
179 const std::string & prefix,
180 int64_t in_features,
181 int64_t out_features,
182 bool use_bias = true) {
183 MioCodecLinearWeights linear;
184 linear.weight = require_loaded_tensor(weights, prefix + ".weight", {out_features, in_features});
185 if (use_bias) {
186 linear.bias = require_loaded_tensor(weights, prefix + ".bias", {out_features});
187 }
188 return linear;
189}
190
191MioCodecLinearWeights bind_qkv_linear(
192 MioCodecWeights & weights,

Callers 5

bind_adalnFunction · 0.85
bind_transformerFunction · 0.85
bind_upsamplerFunction · 0.85
bind_global_encoderFunction · 0.85
bind_component_weightsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected