Skip to content

StatefulModelMixin

Full path: schola.core.model.StatefulModelMixin

Mixin for models that expose non-observation internal state (e.g. RNN hidden state).

StatefulModelMixin

Attributes

initial_state_dict

initial_state_dict

Nested structure of state tensors without batch dimensions.


input_state_dict

input_state_dict

Flattened state inputs keyed as state_in/… for export and ONNX naming.


input_state_keys

input_state_keys

Keys of input_state_dict for export and ONNX naming.


input_state_metadata

input_state_metadata

Flattened metadata for each ONNX state input name.


is_stateful

is_stateful

Whether this model uses non-observation internal state (e.g. RNN hidden state).


output_state_keys

output_state_keys

Keys of output_state_dict for export and ONNX naming.


state_metadata

state_metadata: Metadata aligned with initial_state_dict keys (default

empty StateMetadata for each leaf).