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

Function linear

include/engine/framework/modules/weight_binding.h:84–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82 }
83 const std::string weight_v_name = source.has_tensor(prefix + ".weight_v")
84 ? prefix + ".weight_v"
85 : prefix + ".parametrizations.weight.original1";
86 const std::string weight_g_name = source.has_tensor(prefix + ".weight_g")
87 ? prefix + ".weight_g"
88 : prefix + ".parametrizations.weight.original0";
89
90 std::vector<int64_t> weight_shape;
91 weight_shape.reserve(shape.rank);
92 int64_t inner_size = 1;
93 for (size_t dim = 0; dim < shape.rank; ++dim) {
94 if (shape.dims[dim] <= 0) {
95 throw std::runtime_error(prefix + " weight-norm tensor shape contains non-positive dimension");
96 }

Callers

nothing calls this directly

Calls 1

tensorFunction · 0.85

Tested by

no test coverage detected