Skip to content

Instantly share code, notes, and snippets.

@wayofnumbers
Created October 22, 2019 21:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wayofnumbers/0c7dc1604d4511d8d148306b9af13523 to your computer and use it in GitHub Desktop.
Save wayofnumbers/0c7dc1604d4511d8d148306b9af13523 to your computer and use it in GitHub Desktop.
FMNIST-RunBuilder
# 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