tfm.nlp.layers.LinearTransformLayer

Stay organized with collections Save and categorize content based on your preferences.

Dense, linear transformation layer.

Applies matrix multiplications over sequence and hidden dimensions.

kernel_initializer Initialization scheme for kernel.
name Name for layer.
**kwargs Keyword arguments.

Methods

call

View source

Applies layer to query.

Args
query Batch of input embeddings, typically of shape [batch_size, max_seq_length, hidden_dim].
value Unused. Included to match attention layer API.
**kwargs Optional arguments to catch unused attention keyword arguments.

Returns
Linearly transformed query inputs with shape [batch_size, max_seq_length, hidden_dim].