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

Function graph_dense_block

src/framework/audio/zipenhancer.cpp:252–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250}
251
252core::TensorValue graph_dense_block(
253 core::ModuleBuildContext & ctx,
254 const core::TensorValue & input,
255 const std::unordered_map<std::string, Param> & params,
256 const std::string & prefix) {
257 auto skip = input;
258 auto x = input;
259 for (int i = 0; i < 4; ++i) {
260 const int64_t dilation = int64_t{1} << i;
261 const int64_t pad_top = dilation;
262 const std::string base = prefix + ".dense_block." + std::to_string(i);
263 x = graph_conv2d(
264 ctx,
265 graph_pad2d(ctx, skip, 1, 1, pad_top, 0),
266 params,
267 base + ".1.weight",
268 base + ".1.bias",
269 0,
270 0,
271 1,
272 1,
273 dilation,
274 1);
275 x = graph_instance_norm_prelu(
276 ctx,
277 x,
278 params,
279 base + ".2.weight",
280 base + ".2.bias",
281 base + ".3.weight");
282 skip = modules::ConcatModule({1}).build(ctx, x, skip);
283 }
284 return x;
285}
286
287core::TensorValue graph_dense_encoder(
288 core::ModuleBuildContext & ctx,

Callers 3

graph_dense_encoderFunction · 0.85
graph_mapping_decoderFunction · 0.85

Calls 6

graph_conv2dFunction · 0.85
ConcatModuleClass · 0.85
graph_pad2dFunction · 0.70
to_stringFunction · 0.50
buildMethod · 0.45

Tested by

no test coverage detected