Learn Before
Concept

Linear Regression Forward Pass

Defining a linear regression model involves specifying its forward pass, which mathematically relates input features to the predicted output. This is accomplished by computing the matrix-vector product of the input feature matrix X\mathbf{X} and the model's weight vector w\mathbf{w}, resulting in a new vector. The scalar bias offset bb is then added to this product. Through the tensor broadcasting mechanism, this single scalar bias is automatically added to each component of the Xw\mathbf{Xw} vector. In an object-oriented model design, this computation is defined within a forward method.

0

1

Updated 2026-05-03

Contributors are:

Who are from:

Tags

D2L

Dive into Deep Learning @ D2L