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

Function linear

src/models/vibevoice/tokenizer_audio.cpp:705–717  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

703}
704
705core::TensorValue linear(
706 core::ModuleBuildContext & ctx,
707 const core::TensorValue & input,
708 const modules::LinearWeights & weights) {
709 if (weights.weight.shape.rank != 2) {
710 throw std::runtime_error("VibeVoice tokenizer Linear weight must be rank 2");
711 }
712 return modules::LinearModule({
713 weights.weight.shape.dims[1],
714 weights.weight.shape.dims[0],
715 weights.bias.has_value(),
716 GGML_PREC_DEFAULT}).build(ctx, input, weights);
717}
718
719core::TensorValue tokenizer_block(
720 core::ModuleBuildContext & ctx,

Callers 2

tokenizer_blockFunction · 0.70

Calls 2

LinearModuleClass · 0.85
buildMethod · 0.45

Tested by

no test coverage detected