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 and the model's weight vector , resulting in a new vector. The scalar bias offset is then added to this product. Through the tensor broadcasting mechanism, this single scalar bias is automatically added to each component of the vector. In an object-oriented model design, this computation is defined within a forward method.
0
1
Updated 2026-05-03
Tags
D2L
Dive into Deep Learning @ D2L