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

Function calc_subsampled_dim

src/framework/modules/conformer_modules.cpp:13–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11namespace {
12
13int64_t calc_subsampled_dim(int64_t input_dim, int64_t total_padding, int64_t kernel_size, int layers, int stride) {
14 int64_t value = input_dim;
15 for (int i = 0; i < layers; ++i) {
16 value = (value + total_padding - kernel_size) / stride + 1;
17 }
18 return value;
19}
20
21core::TensorValue calc_subsampled_lengths(
22 core::ModuleBuildContext & ctx,

Callers 1

buildMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected