Skip to content

Instantly share code, notes, and snippets.

@shashankprasanna
Created July 13, 2020 23:38
Show Gist options
  • Select an option

  • Save shashankprasanna/671daf5338396092e4cffcf6e991b2a5 to your computer and use it in GitHub Desktop.

Select an option

Save shashankprasanna/671daf5338396092e4cffcf6e991b2a5 to your computer and use it in GitHub Desktop.
hyperparam_options = {'optimizer': ['adam', 'sgd', 'rmsprop'],
'model': ['resnet', 'custom'],
'epochs': [30, 60, 120]}
hypnames, hypvalues = zip(*hyperparam_options.items())
trial_hyperparameter_set = [dict(zip(hypnames, h)) for h in itertools.product(*hypvalues)]
trial_hyperparameter_set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment