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

Function graph_phase_decoder_real_imag

src/framework/audio/zipenhancer.cpp:874–890  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

872}
873
874std::pair<core::TensorValue, core::TensorValue> graph_phase_decoder_real_imag(
875 core::ModuleBuildContext & ctx,
876 const core::TensorValue & input,
877 const std::unordered_map<std::string, Param> & params) {
878 auto x = graph_dense_block(ctx, input, params, "phase_decoder.dense_block");
879 x = graph_subpixel_conv(ctx, x, params, "phase_decoder.phase_conv.0.conv1.weight", "phase_decoder.phase_conv.0.conv1.bias");
880 x = graph_instance_norm_prelu(
881 ctx,
882 x,
883 params,
884 "phase_decoder.phase_conv.1.weight",
885 "phase_decoder.phase_conv.1.bias",
886 "phase_decoder.phase_conv.2.weight");
887 auto real = graph_conv2d(ctx, x, params, "phase_decoder.phase_conv_r.weight", "phase_decoder.phase_conv_r.bias", 0, 0, 1, 1, 1, 1);
888 auto imag = graph_conv2d(ctx, x, params, "phase_decoder.phase_conv_i.weight", "phase_decoder.phase_conv_i.bias", 0, 0, 1, 1, 1, 1);
889 return {real, imag};
890}
891
892Tensor4 make_model_input(
893 const std::vector<float> & mag,

Callers 1

Calls 4

graph_dense_blockFunction · 0.85
graph_subpixel_convFunction · 0.85
graph_conv2dFunction · 0.85

Tested by

no test coverage detected