returnn.frontend.linear

Provides the Linear module.

class returnn.frontend.linear.Linear(in_dim: Dim, out_dim: Dim, *, with_bias=True)[source]

Linear transformation.

By convention, any options to the module are passed to __init__, and potential changing inputs (other tensors) are passed to __call__().

class returnn.frontend.linear.Embedding(in_dim: Dim, out_dim: Dim)[source]

Embedding.

By convention, any options to the module are passed to __init__, and potential changing inputs (other tensors) are passed to __call__().