action_transformer
action_transformer
¶
Decoder-only transformer for parallel action chunk prediction, with cross-attention to encoding features.
ActionTransformer
¶
ActionTransformer(input_keys, action_space, action_heads, observation_space, observation_horizon, prediction_horizon, device, embedding_dimension=256, number_of_heads=8, number_of_key_value_heads=None, feedforward_dimension=None, number_of_layers=6, activation=value, normalization_type=value, attention_type=value, dropout_rate=0.1, attention_dropout=0.0, positional_encoding_type=value)
Bases: BaseParallelTransformerDecoder
Bidirectional Transformer decoder which decodes action chunks with cross-attention to observation tokens.
Source code in src/versatil/models/decoding/decoders/factory/action_transformer.py
forward
¶
Forward pass of the transformer decoder architecture.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
features
|
dict[str, Tensor]
|
Dictionary of encoded features from EncodingPipeline Expected to contain flat features (B, embedding_dimension) or (B, T, embedding_dimension) |
required |
actions
|
dict[str, Tensor] | None
|
Not used here |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Tensor]
|
Dictionary containing: - Action head predictions (e.g. position, orientation, gripper) |