Created
February 20, 2021 16:59
-
-
Save obeshor/a67232db4021ac10167b50a64a5c83c3 to your computer and use it in GitHub Desktop.
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
#Run a few experiments, which will take a few minutes | |
session_num = 0 | |
for num_filters in HP_NUM_FILTERS.domain.values: | |
for dropout_rate in (HP_DROPOUT.domain.min_value, HP_DROPOUT.domain.max_value): | |
for activation in HP_ACTIVATION.domain.values: | |
for num_units in HP_NUM_UNITS.domain.values: | |
for optimizer in HP_OPTIMIZER.domain.values: | |
hparams = { | |
HP_NUM_FILTERS: num_filters, | |
HP_DROPOUT: dropout_rate, | |
HP_ACTIVATION: activation, | |
HP_NUM_UNITS: num_units, | |
HP_OPTIMIZER: optimizer | |
} | |
run_name = "run-%d" % session_num | |
print('--- Starting trial: %s' % run_name) | |
print({h.name: hparams[h] for h in hparams}) | |
run('logs/hparam_tuning/' + run_name, hparams) | |
session_num += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment