API reference
Block-forecast models
Signatures, parameters, return contracts, and source for block-forecast models.
Module contract
CausalBlockForecastModel predicts native outputs through causal block forecasting. The top-level AxoSimGRU alias points to this implementation. Its backbone and BlockForecastConfig constructor contract differs from the named GRU-profile factory.
Source revision: 306a51ed950b. Public export index.
BlockForecastConfig
Configuration for causal next-block trajectory prediction.
BlockForecastConfig(core_kind: BlockForecastCore, patch_size: int, max_patch_rank: int = 8, max_trajectory_rank: int = 8, keep_local_tcn: bool = False, gru_hidden_units: int | None = None, residual_scale_init: float = 0.1, voltage_anchor_count: int | None = None, event_template: tuple[float, ...] | None = None, event_template_center_init: float = 0.9208316802978516, event_template_temperature: float = 0.25, event_template_hard: bool = False, behavior_adaptation: bool = False) -> None
Fields
| Parameter | Type | Default |
|---|---|---|
core_kind |
BlockForecastCore |
required |
patch_size |
int |
required |
max_patch_rank |
int |
8 |
max_trajectory_rank |
int |
8 |
keep_local_tcn |
bool |
False |
gru_hidden_units |
int | None |
None |
residual_scale_init |
float |
0.1 |
voltage_anchor_count |
int | None |
None |
event_template |
tuple[float, ...] | None |
None |
event_template_center_init |
float |
0.9208316802978516 |
event_template_temperature |
float |
0.25 |
event_template_hard |
bool |
False |
behavior_adaptation |
bool |
False |
patch_size: Native timesteps represented by one block. behavior_adaptation: Enable the learned behavior adaptation bank.
CausalBlockForecastModel
Predict each native-resolution output block from prior input blocks.
Bases: nn.Module.
CausalBlockForecastModel.init
__init__(self, source: nn.Module, forecast_config: BlockForecastConfig) -> None
| Parameter | Type | Default |
|---|---|---|
source |
nn.Module |
required |
forecast_config |
BlockForecastConfig |
required |
Returns None.
CausalBlockForecastModel.config
CausalBlockForecastModel.config
Read-only property. Access as instance.config; do not call it as a function.
CausalBlockForecastModel.num_input
CausalBlockForecastModel.num_input: int
Read-only property. Access as instance.num_input; do not call it as a function.
Returns int.
CausalBlockForecastModel.num_output
CausalBlockForecastModel.num_output: int
Read-only property. Access as instance.num_output; do not call it as a function.
Returns int.
CausalBlockForecastModel.num_branch
CausalBlockForecastModel.num_branch: int
Read-only property. Access as instance.num_branch; do not call it as a function.
Returns int.
CausalBlockForecastModel.patch_size
CausalBlockForecastModel.patch_size: int
Read-only property. Access as instance.patch_size; do not call it as a function.
Returns int.
CausalBlockForecastModel.sparse_voltage_output
CausalBlockForecastModel.sparse_voltage_output: bool
Read-only property. Access as instance.sparse_voltage_output; do not call it as a function.
Returns bool.
CausalBlockForecastModel.behavior_parameter_count
CausalBlockForecastModel.behavior_parameter_count: int
Read-only property. Access as instance.behavior_parameter_count; do not call it as a function.
Returns int.
CausalBlockForecastModel.block_state_sequence
block_state_sequence(self, x: torch.Tensor, *, morphology_indices: torch.Tensor | None=None, behavior_parameters: torch.Tensor | None=None) -> torch.Tensor
Encode a native sequence and return each causal macro state.
| Parameter | Type | Default |
|---|---|---|
x |
torch.Tensor |
required |
morphology_indices |
torch.Tensor | None |
None |
behavior_parameters |
torch.Tensor | None |
None |
Returns torch.Tensor.
CausalBlockForecastModel.decode_block_state_sequence
decode_block_state_sequence(self, block_state: torch.Tensor, *, behavior_parameters: torch.Tensor | None=None) -> torch.Tensor
Decode dense native-rate trajectories from causal macro states.
| Parameter | Type | Default |
|---|---|---|
block_state |
torch.Tensor |
required |
behavior_parameters |
torch.Tensor | None |
None |
Returns torch.Tensor.
CausalBlockForecastModel.forward
forward(self, x: torch.Tensor, *, morphology_indices: torch.Tensor | None=None, behavior_parameters: torch.Tensor | None=None) -> torch.Tensor
| Parameter | Type | Default |
|---|---|---|
x |
torch.Tensor |
required |
morphology_indices |
torch.Tensor | None |
None |
behavior_parameters |
torch.Tensor | None |
None |
Returns torch.Tensor.
CausalBlockForecastModel.component_manifest
component_manifest(self) -> dict[str, object]
Returns dict[str, object].