Linear#

class seli.net.Linear(dim: int)[source]#

Bases: Module

Apply a learnable linear transformation to last axis of the input.

Parameters:
  • key (PRNGKeyArray) – Key to use for random initialization.

  • dim (int) – Dimensionality of the output. The input dimension is inferred from the last axis of the first input.

Attributes Summary

dim_in

Return the input dimension of the module.

Methods Summary

__call__(x)

Call self as a function.

Attributes Documentation

dim_in#

Return the input dimension of the module. If the module does not have a fixed input dimension yet, return None.

Methods Documentation

__call__(x: Float[Array, '*batch dim_in']) Float[Array, '*batch {self.dim}'][source]#

Call self as a function.