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

Function sigmoid

src/models/chatterbox/voice_encoder_impl.cpp:18–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16namespace {
17
18float sigmoid(float value) {
19 if (value >= 0.0f) {
20 const float z = std::exp(-value);
21 return 1.0f / (1.0f + z);
22 }
23 const float z = std::exp(value);
24 return z / (1.0f + z);
25}
26
27std::vector<float> l2_normalize(const std::vector<float> & values) {
28 float norm_sq = 0.0f;

Callers 1

run_lstm_layerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected