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

Function repeat_first_frame

src/framework/modules/streaming_conv_modules.cpp:67–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 auto prefix_contiguous = tensor_layout::ensure_contiguous_layout_if_needed(ctx, prefix);
66 return core::wrap_tensor(ggml_scale(ctx.ggml, prefix_contiguous.tensor, 0.0f), prefix.shape, GGML_TYPE_F32);
67}
68
69core::TensorValue repeat_first_frame(
70 core::ModuleBuildContext & ctx,
71 const core::TensorValue & input,
72 int64_t prefix_frames) {
73 auto first = SliceModule({2, 0, 1}).build(ctx, input);
74 return RepeatModule({core::TensorShape::from_dims({input.shape.dims[0], input.shape.dims[1], prefix_frames})}).build(ctx, first);
75}
76

Callers 1

buildMethod · 0.85

Calls 3

SliceModuleClass · 0.85
RepeatModuleClass · 0.85
buildMethod · 0.45

Tested by

no test coverage detected