oarust 0.14.1

GPU-first semantic computing engine written in Rust
1
2
3
// Stable Katharopoulos feature map; negative values never subtract/add one.
float phi(float x) { return x >= 0.0f ? x + 1.0f : exp(x); }
float phi_grad(float x) { return x >= 0.0f ? 1.0f : exp(x); }