base
base
¶
Base contract for configurable action heads.
BaseActionHead
¶
Bases: ABC, Module
Abstract base class for action heads with block-based processing and output projection.
The output dimension is set lazily via set_output_dim() because action heads are instantiated from config with only the embedding dimension known. The output dimension depends on the ActionSpace (resolved by ActionDecoder during policy assembly) or the tokenizer vocabulary size (for tokenized decoders).
Subclasses must implement forward() with their specific return type.
Initialize base action head.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_dimension
|
int
|
Input embedding dimension from decoder. |
required |
blocks
|
list[ActionHeadBlock] | None
|
Blocks to apply before output projection. |
None
|