blocks.perceiver_block_config

Classes

PerceiverBlockConfig

Configuration for the PerceiverBlock module.

Module Contents

class blocks.perceiver_block_config.PerceiverBlockConfig(/, **data)

Bases: emmi.schemas.modules.blocks.transformer_block_config.TransformerBlockConfig

Configuration for the PerceiverBlock module.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:

data (Any)

kv_dim: int | None = None

Dimensionality of the key and value represenations. Defaults to None. If None, hidden_dim is used.

set_kv_dim()

Set kv_dim to hidden_dim if not provided.

Return type:

PerceiverBlockConfig