Skip to content

Instantly share code, notes, and snippets.

@lmassaron
Created August 30, 2019 06:27
Show Gist options
  • Select an option

  • Save lmassaron/0bce501423823ea857b9cd2375a93ccc to your computer and use it in GitHub Desktop.

Select an option

Save lmassaron/0bce501423823ea857b9cd2375a93ccc to your computer and use it in GitHub Desktop.
Creating a class for your model's hyper-parameters
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