omnibias.keras
Keras 3 operator layers and activation paths implemented with keras.ops for TensorFlow, JAX, or Torch.
import omnibias.kerasUse the Keras distribution when your model lifecycle, layer configuration, and serialization are managed by Keras 3. Set KERAS_BACKEND before importing Keras or omnibias.keras; switching that variable after initialization does not reinitialize the backend. Install a compatible numerical backend alongside this alpha distribution.
Layer input and output dimensions, operator order, and build-time state are part of the individual layer contract. A layer's configurable operator is not evidence that every activation, order, dtype, or backend path is supported. Verify the combination you will train. Configuration round trips and numerical equality are separate checks.
The downloadable Keras example runs OMBU on a complete input batch, checks the output shape and finite values, and reconstructs the layer from its configuration. It is validated separately on TensorFlow, JAX, and Torch. More specialized APIs need their own path-specific validation; this example is not a blanket backend-parity certificate.
Module contract & mathematical conventions
omnibias.keras: Keras 3 unified backend for omnibias.
The same code runs on TensorFlow, JAX, or PyTorch because every kernel is
written against keras.ops. Closed-form n-th derivative towers
(sigma^(n)(z)) share their polynomial coefficients with the torch and
JAX backends via omnibias.core.polynomials, so the closed-form
activation / derivative math is algebraically corresponding across backends by construction.
End-to-end layer numerics otherwise follow the selected Keras backend
(TensorFlow / JAX / PyTorch).
Select the Keras backend with the KERAS_BACKEND environment variable
(tensorflow | jax | torch) *before* importing keras.
Public API:
OperatorMultiBiasUnit(aliasOMBU): trainable scalar-operator primitive (akeras.layers.Layer).GrowableOperatorMultiBiasUnit(aliasGrowableOMBU): the OMBU with a growable bias arityK.OperatorBlock: typed wrapper selecting K and forward behaviour fromop="grad"|"laplacian"|"derivative"|"band"|"integral"|"identity".cmbDense,cmbConv1D,cmbConv2D: drop-inDense/Conv1D/Conv2Dwith an inlineOperatorBlock.KGrowthScheduler: plateau-triggered K-growth controller.get_activation,list_activations,register_activation,is_registered: registry accessors.
Numerical scope: shared coefficients and formulas do not establish universal floating-point identity across backends, devices, compiler transforms, or reduction orders. Compare the chosen path with dtype-appropriate tolerances; even float64 is not a general bitwise-equality guarantee. Algebraic initialization identities likewise need a numerical check for the selected coefficients and reduction order.
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.
activationsModule ↗blocksModule ↗fastpathModule ↗growableModule ↗identity_initModule ↗stencilModule ↗tempered_blocksModule ↗trainingModule ↗unitModule ↗Imports & aliases
These names share a definition with another public module. Follow a name for its full contract, parameters, and examples.
| Import from this module | Canonical reference |
|---|---|
ActivationSpec | omnibias.core.ActivationSpec |
AnalyticGaussianConv1D | omnibias.keras.AnalyticGaussianConv1D |
AnalyticGaussianConv2D | omnibias.keras.AnalyticGaussianConv2D |
GrowStrategy | omnibias.keras.GrowStrategy |
GrowableOMBU | omnibias.keras.GrowableOMBU |
GrowableOperatorMultiBiasUnit | omnibias.keras.GrowableOMBU |
KGrowthScheduler | omnibias.keras.KGrowthScheduler |
LearnablePReLU | omnibias.keras.LearnablePReLU |
OMBU | omnibias.keras.OMBU |
OpName | omnibias.keras.OpName |
OperatorBlock | omnibias.keras.OperatorBlock |
OperatorMultiBiasUnit | omnibias.keras.OMBU |
TemperedActivation | omnibias.keras.TemperedActivation |
analytic_gaussian_taps | omnibias.keras.analytic_gaussian_taps |
cmbConv1D | omnibias.keras.cmbConv1D |
cmbConv2D | omnibias.keras.cmbConv2D |
cmbDense | omnibias.keras.cmbDense |
get_activation | omnibias.keras.get_activation |
is_registered | omnibias.keras.is_registered |
list_activations | omnibias.keras.list_activations |
register_activation | omnibias.keras.register_activation |