std1.0.0-beta-7 SafeC docs

Module ml::activations

#include <std/ml/activations.h> source

Activation functions on Tensor.

Forward-only (see attention.h's header comment — this library's scope is inference, not training end-to-end; tensor.h's core ops already carry real Autograd::get for the pieces that need it).

Every function here has a 'fwd' suffix specifically to avoid colliding with tensor_nn.h's same-shaped-but-Autograd::get-carrying versions (Tensor::relu, Tensor::sigmoid, etc.) — this file and tensor_nn.h/.sc used to share those exact names, which meant a program could never link both (e.g. transformer.sc, which needs this file's Tensor::layernorm_rows/tensor_residual_add, previously couldn't also link any tensor<backend>.sc GPU file, since every one of those #includes tensor_nn.h/.sc internally for its own backward-linking needs). Renamed once this stopped being hypothetical: a device dispatch layer combining GPU-backed ops with transformer.h's layers hit exactly this collision.

Functions

tensor_residual_addx + sublayerOut. A plain alias for tensor_add, named for residual/ skip-connection call sites (ResNet blocks, transformer sublayers).