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

Function build_streaming_convtranspose1d

src/framework/codecs/neural_audio.cpp:28–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28TensorValue build_streaming_convtranspose1d(
29 engine::core::ModuleBuildContext & ctx,
30 const TensorValue & input,
31 const engine::modules::ConvTranspose1dWeights & weights,
32 int64_t in_channels,
33 int64_t out_channels,
34 int64_t kernel_size,
35 int stride,
36 bool use_bias) {
37 auto output = ConvTranspose1dModule({
38 in_channels,
39 out_channels,
40 kernel_size,
41 stride,
42 0,
43 1,
44 use_bias,
45 }).build(ctx, input, weights);
46 const int64_t crop = kernel_size - stride;
47 if (crop <= 0) {
48 return output;
49 }
50 return SliceModule({2, 0, output.shape.dims[2] - crop}).build(ctx, output);
51}
52
53TensorValue build_seanet_residual_block(
54 engine::core::ModuleBuildContext & ctx,

Callers 1

buildMethod · 0.85

Calls 3

SliceModuleClass · 0.85
buildMethod · 0.45

Tested by

no test coverage detected