Learn Before
The HyperParameters Utility Class
When implementing machine learning models, extending constructor call signatures often requires repetitive code to save arguments as class attributes. The HyperParameters utility serves as a base class to streamline this process. By inheriting from HyperParameters and calling the self.save_hyperparameters() method within the init constructor, a class can implicitly save all provided arguments as class attributes without requiring additional, explicit assignment statements for each variable.
0
1
Tags
D2L
Dive into Deep Learning @ D2L
Related
Defining Classes in Python
Class Variable vs Instance Variable
Class Inheritance
"Self" Keyword in Python Class
init() method in Python
Methods vs. Functions
Encapsulation in Python
Class Composition
Math Constants
Math Constants
Useful Math Constants in Python
The add_to_class Utility Function
The HyperParameters Utility Class
The ProgressBoard Utility Class
Base Module Class in Deep Learning Implementation