API reference
Branch-ELM compatibility
Signatures, parameters, return contracts, and source for branch-elm compatibility.
Overview
BranchELM and BranchELMConfig provide the baseline and checkpoint-compatible branched neuron implementation. Inputs use (batch, time, input_channels); the standard two-channel readout contains a spike logit and a soma target coordinate.
Source revision: caef7be03abd. Public export index.
BranchELMConfig
axosim.model.BranchELMConfig(input_dim: int = 1278, memory_units: int = 30, num_branches: int = 32, hidden_units: int = 64, synapse_decay: float = 0.85, memory_decay: float = 0.9)
Dimensions and decay constants for the branched recurrent neuron.
Parameters
input_dimint- default=1278. Native input-channel count.
memory_unitsint- default=30. Width of the recurrent memory state.
num_branchesint- default=32. Number of branched input features.
hidden_unitsint- default=64. Width of the hidden feature layer.
synapse_decayfloat- default=0.85. Decay coefficient of the synaptic trace.
memory_decayfloat- default=0.9. Decay coefficient of recurrent memory.
Attributes
Constructor fields are retained as read-only attributes.
Methods
BranchELMConfig.branch_elm_30
@classmethod
axosim.model.BranchELMConfig.branch_elm_30(*, input_dim: int=1278, num_branches: int=32) -> 'BranchELMConfig'
Parameters
input_dimint- keyword-only, default=1278. Native input-channel count.
num_branchesint- keyword-only, default=32. Number of branched input features.
Returns
'BranchELMConfig'
BranchELM
axosim.model.BranchELM(config: BranchELMConfig)
Branch-factorized recurrent surrogate with spike and soma outputs.
Bases: nn.Module.
Parameters
configBranchELMConfig- required. Model configuration; use the defaults and constraints documented for its configuration class.
Methods
BranchELM.forward
axosim.model.BranchELM.forward(x: torch.Tensor) -> torch.Tensor
Predict native spike and soma outputs for the supplied sequence.
x must be (B,T,config.input_dim). Returns (B,T,2), with one spike logit and one soma target coordinate per step. Synaptic and memory states start at zero for each call.
Parameters
xtorch.Tensor- required. Input tensor for the full-sequence or streaming operation.
Returns
predictiontorch.Tensor- Spike-logit and soma-target channels in the tensor shape specified above.
BranchELM.parameter_count
axosim.model.BranchELM.parameter_count() -> int
Return the count of trainable parameters.
Returns
int