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

Function graph_softplus_shifted

src/framework/audio/zipenhancer.cpp:471–476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

469}
470
471core::TensorValue graph_softplus_shifted(core::ModuleBuildContext & ctx, const core::TensorValue & input, float offset) {
472 auto shifted = graph_scale_bias(ctx, input, 1.0f, -offset);
473 auto exp_value = core::wrap_tensor(ggml_exp(ctx.ggml, shifted.tensor), input.shape, GGML_TYPE_F32);
474 auto plus_one = graph_scale_bias(ctx, exp_value, 1.0f, 1.0f);
475 return core::wrap_tensor(ggml_log(ctx.ggml, plus_one.tensor), input.shape, GGML_TYPE_F32);
476}
477
478core::TensorValue graph_swoosh_l(core::ModuleBuildContext & ctx, const core::TensorValue & input) {
479 auto y = graph_softplus_shifted(ctx, input, 4.0f);

Callers 2

graph_swoosh_lFunction · 0.85
graph_swoosh_rFunction · 0.85

Calls 4

wrap_tensorFunction · 0.85
ggml_expFunction · 0.85
ggml_logFunction · 0.85
graph_scale_biasFunction · 0.70

Tested by

no test coverage detected