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

Function view_batch_matrix

src/models/ace_step/vae_decoder.cpp:180–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180core::TensorValue view_batch_matrix(
181 core::ModuleBuildContext & ctx,
182 const core::TensorValue & input,
183 int64_t batch_index,
184 int64_t channels,
185 int64_t frames) {
186 auto * view = ggml_view_2d(
187 ctx.ggml,
188 input.tensor,
189 frames,
190 channels,
191 input.tensor->nb[1],
192 static_cast<size_t>(batch_index) * input.tensor->nb[2]);
193 return core::wrap_tensor(view, core::TensorShape::from_dims({channels, frames}), input.type);
194}
195
196core::TensorValue build_snake1d_exact_bct(
197 core::ModuleBuildContext & ctx,

Callers 3

build_conv1dFunction · 0.70
build_conv_transpose1dFunction · 0.70

Calls 2

ggml_view_2dFunction · 0.85
wrap_tensorFunction · 0.85

Tested by

no test coverage detected