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

Function softmax_values

src/framework/audio/zipenhancer.cpp:713–725  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

711}
712
713std::vector<float> softmax_values(const Param & bias) {
714 const float max_value = *std::max_element(bias.values.begin(), bias.values.end());
715 std::vector<float> values = bias.values;
716 float denom = 0.0f;
717 for (float & value : values) {
718 value = std::exp(value - max_value);
719 denom += value;
720 }
721 for (float & value : values) {
722 value /= denom;
723 }
724 return values;
725}
726
727core::TensorValue graph_downsample(
728 core::ModuleBuildContext & ctx,

Callers 1

graph_downsampleFunction · 0.85

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected