Identity Sequence Mixer¤
linax.sequence_mixers.identity.IdentitySequenceMixerConfig
¤
Configuration for the Identity sequence mixer.
This configuration class defines a simple pass-through sequence mixer that returns the input unchanged. The state_dim parameter is required for compatibility with the base class but is not used by the identity mixer.
Attributes:
| Name | Type | Description |
|---|---|---|
state_dim |
Dimensionality of the state space (unused, for compatibility). |
build(in_features: int, key: PRNGKeyArray) -> IdentitySequenceMixer
¤
Build sequence mixer from config.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
in_features
|
int
|
Input dimensionality. |
required |
key
|
PRNGKeyArray
|
JAX random key for initialization. |
required |
Returns:
| Type | Description |
|---|---|
IdentitySequenceMixer
|
The sequence mixer instance. |
linax.sequence_mixers.identity.IdentitySequenceMixer
¤
Identity sequence mixer layer.
This layer implements a simple identity/pass-through operation that returns the input sequence unchanged.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
in_features
|
int
|
Input dimensionality. |
required |
cfg
|
ConfigType
|
Configuration for the Identity sequence mixer. |
required |
key
|
PRNGKeyArray
|
JAX random key for initialization. |
required |
__init__(in_features: int, cfg: ConfigType, key: PRNGKeyArray)
¤
Initialize the Identity sequence mixer layer.
__call__(x: Array, key: PRNGKeyArray) -> Array
¤
Forward pass of the Identity sequence mixer layer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
Array
|
Input sequence of features. |
required |
key
|
PRNGKeyArray
|
JAX random key (unused, for compatibility). |
required |
Returns:
| Type | Description |
|---|---|
Array
|
The input sequence unchanged. |