Created
August 30, 2019 06:27
-
-
Save lmassaron/0bce501423823ea857b9cd2375a93ccc to your computer and use it in GitHub Desktop.
Creating a class for your model's hyper-parameters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class AllMyFields: | |
| def __init__(self, dictionary): | |
| for k, v in dictionary.items(): | |
| setattr(self, k, v) | |
| o = AllMyFields({'alpha': 1, 'beta': 2}) | |
| o.a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment