Identity Channel Mixer¤
linax.channel_mixers.identity.IdentityChannelMixerConfig
¤
Configuration for the identity channel mixer.
build(in_features: int, out_features: int | None, key: PRNGKeyArray) -> IdentityChannelMixer
¤
Build IdentityChannelMixer from config.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
in_features
|
int
|
Input dimensionality. |
required |
out_features
|
int | None
|
Optional output dimensionality. If None, defaults to in_features. |
required |
key
|
PRNGKeyArray
|
JAX random key for initialization. |
required |
Returns:
| Type | Description |
|---|---|
IdentityChannelMixer
|
The IdentityChannelMixer instance. |
linax.channel_mixers.identity.IdentityChannelMixer
¤
Identity channel mixer.
This channel mixer simply returns the input unchanged.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
in_features
|
int
|
The input dimensionality. |
required |
cfg
|
ConfigType
|
Configuration for the identity channel mixer. |
required |
key
|
PRNGKeyArray
|
JAX random key for initialization. |
required |
out_features
|
int | None
|
Optional output dimensionality. If None, defaults to in_features. |
None
|
__init__(in_features: int, cfg: ConfigType, key: PRNGKeyArray, *, out_features: int | None = None)
¤
Initialize the identity channel mixer.
__call__(x: Array) -> Array
¤
Forward pass of the identity channel mixer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
Array
|
Input tensor. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
The input tensor unchanged. |