src.models package

Submodules

src.models.linear module

class src.models.linear.LinearNetModel(input_dim: int, bias: bool = True)[source]

Bases: Module

Simple Linear Regression Model

Parameters:
  • input_dim (int) – Number of model input features.

  • bias – Whether to include a bias term in the linear layer.

forward(x: Tensor) Tensor[source]

Forward pass of the model. Applies a linear transformation without any activation, returning the raw output.

Parameters:

x (torch.Tensor) – Input tensor of shape (batch_size, input_dim).

Returns:

Output tensor of shape (batch_size,).

Return type:

torch.Tensor

Module contents