std1.0.0-beta-7 SafeC docs

std :: ml::ssm

Function std::ssm_selective_scan

#include <std/ml/ssm.h> source ยท definition

&FloatTensor ssm_selective_scan(
    const &FloatTensor x,
    const &FloatTensor delta,
    const &FloatTensor A,
    const &FloatTensor B,
    const &FloatTensor C,
    const &FloatTensor Dskip,
)

The selective scan on its own. x, delta: [T, D] (delta already positive, e.g. after softplus); A: [D, N] (negative for a decaying state); B, C: [T, N]; Dskip: [D] (the skip connection, D in the paper). Returns y: [T, D]. The state starts at zero.