conditional
conditional
¶
Conditional action heads.
ConditionalActionHead
¶
Bases: BaseActionHead
Action head whose blocks receive a conditioning vector.
Initialize the conditional action head.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_dimension
|
int
|
Input action-token embedding dimension. |
required |
conditioning_dimension
|
int
|
Conditioning vector dimension. |
required |
blocks
|
list[ConditionalActionHeadBlock] | None
|
Conditional blocks applied before the output projection. |
None
|
Source code in src/versatil/models/decoding/action_heads/conditional.py
forward
¶
Project conditioned action embeddings to action predictions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action_embedding
|
Tensor
|
Action-token embeddings with shape
|
required |
condition
|
Tensor
|
Conditioning tensor with shape |
required |
Returns:
| Type | Description |
|---|---|
Tensor
|
Action predictions with shape |
Tensor
|
|