Learn Before
Example
Instantiating SyntheticRegressionData
Once the SyntheticRegressionData class is defined, we can instantiate it with predefined ground truth parameters to create our synthetic dataset. For example, by specifying the true weight vector as and the bias as , the resulting data object will store the generated features and labels. Inspecting an individual data point from this instantiated object, such as the first entry, will return a feature vector in and its corresponding computed scalar label.
0
1
Updated 2026-05-02
Tags
D2L
Dive into Deep Learning @ D2L