Created
October 22, 2019 21:56
-
-
Save wayofnumbers/0c7dc1604d4511d8d148306b9af13523 to your computer and use it in GitHub Desktop.
FMNIST-RunBuilder
This file contains 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
# import modules to build RunBuilder and RunManager helper classes | |
from collections import OrderedDict | |
from collections import namedtuple | |
from itertools import product | |
# Read in the hyper-parameters and return a Run namedtuple containing all the | |
# combinations of hyper-parameters | |
class RunBuilder(): | |
@staticmethod | |
def get_runs(params): | |
Run = namedtuple('Run', params.keys()) | |
runs = [] | |
for v in product(*params.values()): | |
runs.append(Run(*v)) | |
return runs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment