Skip to main content

omnibias.keras.activations.smooth

0.0.2a1AlphaPython >=3.10Apache-2.0

Keras 3 operator layers and activation paths implemented with keras.ops for TensorFlow, JAX, or Torch.

import omnibias.keras.activations.smooth
Module contract & mathematical conventions

Smooth Riccati-class activations: sigmoid, tanh, softplus, gaussian.

Each has a closed-form derivative tower, so its ActivationSpec carries a fast-path kernel that evaluates sigma^(n)(z) with one base activation call regardless of order. Mirrors omnibias.torch.activations.smooth on keras.ops.

Shared formulas do not imply universal floating-point identity. Verify dtype, shape, derivative-order support, and the stated numerical assumptions for the path you use.

CONSTANT

GAUSSIAN​

omnibias.keras.activations.smooth.GAUSSIANSource ↗
GAUSSIAN = register_activation(ActivationSpec(name='gaussian', forward=_gaussian, derivative=_gaussian_derivative, fastpath=gaussian_nth_derivative, integral=_gaussian_integral, riccati_polynomial=None, noise_model='gaussian_kernel', operator_role='K=2 collapse -> -z * exp(-z^2/2); RBF/Hermite spectral basis, Laplacian-of-Gaussian and Difference-of-Gaussian conv kernels.', aliases=('rbf',)))

This exported constant is defined by the expression above. Its exact value and annotation come from the pinned source; use it with the module contract.

Read the implementation
GAUSSIAN = register_activation(
    ActivationSpec(
        name="gaussian",
        forward=_gaussian,
        derivative=_gaussian_derivative,
        fastpath=gaussian_nth_derivative,
        integral=_gaussian_integral,
        riccati_polynomial=None,
        noise_model="gaussian_kernel",
        operator_role=(
            "K=2 collapse -> -z * exp(-z^2/2); RBF/Hermite spectral basis, "
            "Laplacian-of-Gaussian and Difference-of-Gaussian conv kernels."
        ),
        aliases=("rbf",),
    )
)
CONSTANT

SIGMOID​

omnibias.keras.activations.smooth.SIGMOIDSource ↗
SIGMOID = register_activation(ActivationSpec(name='sigmoid', forward=_sigmoid, derivative=_sigmoid_derivative, fastpath=sigmoid_nth_derivative, tower=sigmoid_tower, integral=_sigmoid_integral, riccati_polynomial=(0.0, 1.0, -1.0), noise_model='bernoulli', operator_role='K=2 collapse -> Bernoulli variance s(1-s); Newton/IRLS step for logistic regression.', aliases=('logistic',)))

This exported constant is defined by the expression above. Its exact value and annotation come from the pinned source; use it with the module contract.

Read the implementation
SIGMOID = register_activation(
    ActivationSpec(
        name="sigmoid",
        forward=_sigmoid,
        derivative=_sigmoid_derivative,
        fastpath=sigmoid_nth_derivative,
        tower=sigmoid_tower,
        integral=_sigmoid_integral,
        riccati_polynomial=(0.0, 1.0, -1.0),
        noise_model="bernoulli",
        operator_role=(
            "K=2 collapse -> Bernoulli variance s(1-s); Newton/IRLS step for logistic regression."
        ),
        aliases=("logistic",),
    )
)
CONSTANT

SOFTPLUS​

omnibias.keras.activations.smooth.SOFTPLUSSource ↗
SOFTPLUS = register_activation(ActivationSpec(name='softplus', forward=_softplus, derivative=_softplus_derivative, fastpath=softplus_nth_derivative, tower=softplus_tower, riccati_polynomial=None, noise_model='bernoulli', operator_role='K=2 collapse -> sigmoid (Bernoulli mean); log-link Newton step / canonical PINN base for diffusion-class PDEs.'))

This exported constant is defined by the expression above. Its exact value and annotation come from the pinned source; use it with the module contract.

Read the implementation
SOFTPLUS = register_activation(
    ActivationSpec(
        name="softplus",
        forward=_softplus,
        derivative=_softplus_derivative,
        fastpath=softplus_nth_derivative,
        tower=softplus_tower,
        riccati_polynomial=None,
        noise_model="bernoulli",
        operator_role=(
            "K=2 collapse -> sigmoid (Bernoulli mean); "
            "log-link Newton step / canonical PINN base for diffusion-class PDEs."
        ),
    )
)
CONSTANT

TANH​

omnibias.keras.activations.smooth.TANHSource ↗
TANH = register_activation(ActivationSpec(name='tanh', forward=_tanh, derivative=_tanh_derivative, fastpath=tanh_nth_derivative, tower=tanh_tower, integral=_tanh_integral, riccati_polynomial=(1.0, 0.0, -1.0), noise_model='symmetric_bernoulli', operator_role='K=2 collapse -> 1 - tanh^2; symmetric IRLS bell, useful as a saturation-aware feature gate.'))

This exported constant is defined by the expression above. Its exact value and annotation come from the pinned source; use it with the module contract.

Read the implementation
TANH = register_activation(
    ActivationSpec(
        name="tanh",
        forward=_tanh,
        derivative=_tanh_derivative,
        fastpath=tanh_nth_derivative,
        tower=tanh_tower,
        integral=_tanh_integral,
        riccati_polynomial=(1.0, 0.0, -1.0),
        noise_model="symmetric_bernoulli",
        operator_role=(
            "K=2 collapse -> 1 - tanh^2; symmetric IRLS bell, "
            "useful as a saturation-aware feature gate."
        ),
    )
)