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

Function build_encoder_block

src/models/ace_step/vae_encoder.cpp:21–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19namespace {
20
21core::TensorValue build_encoder_block(
22 core::ModuleBuildContext & ctx,
23 const core::TensorValue & input,
24 const EncoderBlockWeights & weights,
25 int64_t in_channels,
26 int64_t out_channels) {
27 auto hidden = build_residual_unit(ctx, input, weights.res1, in_channels, 1);
28 hidden = build_residual_unit(ctx, hidden, weights.res2, in_channels, 3);
29 hidden = build_residual_unit(ctx, hidden, weights.res3, in_channels, 9);
30 hidden = build_snake1d_exact_bct(ctx, hidden, weights.snake, in_channels);
31 hidden = build_conv1d(ctx, hidden, weights.conv, in_channels, out_channels, true);
32 return hidden;
33}
34
35} // namespace
36

Callers 1

buildMethod · 0.85

Calls 3

build_snake1d_exact_bctFunction · 0.85
build_conv1dFunction · 0.85
build_residual_unitFunction · 0.70

Tested by

no test coverage detected