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

Function reshape_heads

src/models/stable_audio/same_autoencoder.cpp:195–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193}
194
195core::TensorValue reshape_heads(
196 core::ModuleBuildContext & ctx,
197 const core::TensorValue & input,
198 int64_t heads,
199 int64_t dim) {
200 return core::reshape_tensor(
201 ctx,
202 ensure_contiguous(ctx, input),
203 core::TensorShape::from_dims({input.shape.dims[0], input.shape.dims[1], heads, dim}));
204}
205
206core::TensorValue same_attention(
207 core::ModuleBuildContext & ctx,

Callers 1

same_self_attentionFunction · 0.70

Calls 2

reshape_tensorFunction · 0.85
ensure_contiguousFunction · 0.70

Tested by

no test coverage detected