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

Function reshape_heads

src/models/vibevoice/decoder.cpp:63–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63core::TensorValue reshape_heads(
64 core::ModuleBuildContext & ctx,
65 const core::TensorValue & input,
66 int64_t heads,
67 int64_t dim) {
68 const auto contiguous = core::ensure_backend_addressable_layout(ctx, input);
69 return core::reshape_tensor(
70 ctx,
71 contiguous,
72 core::TensorShape::from_dims({input.shape.dims[0], input.shape.dims[1], heads, dim}));
73}
74
75core::TensorValue repeat_kv_heads(core::ModuleBuildContext & ctx, const core::TensorValue & input, int64_t repeats) {
76 if (repeats == 1) {

Calls 2

reshape_tensorFunction · 0.85

Tested by

no test coverage detected