MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / ggml_vec_leaky_f32

Function ggml_vec_leaky_f32

ggml.c:1404–1404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1402inline static void ggml_vec_elu_f32 (const int n, float * y, const float * x) { for (int i = 0; i < n; ++i) y[i] = (x[i] > 0.f) ? x[i] : expf(x[i])-1; }
1403inline static void ggml_vec_relu_f32 (const int n, float * y, const float * x) { for (int i = 0; i < n; ++i) y[i] = (x[i] > 0.f) ? x[i] : 0.f; }
1404inline static void ggml_vec_leaky_f32 (const int n, float * y, const float * x) { for (int i = 0; i < n; ++i) y[i] = (x[i] > 0.f) ? x[i] : 0.1f*x[i]; }
1405
1406static const float GELU_COEF_A = 0.044715f;
1407static const float GELU_QUICK_COEF = -1.702f;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected