Last active
June 10, 2019 03:51
-
-
Save icoxfog417/99c183b2464c4a10777459454be5417c to your computer and use it in GitHub Desktop.
allennlp_tutorial_tuner.py
This file contains hidden or 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
hyperparameter_ranges = { | |
"lr": ContinuousParameter(0.01, 0.1), | |
"embedding-dim": CategoricalParameter([6, 12]), | |
"hidden-dim": CategoricalParameter([6, 12]) | |
} | |
objective_metric_name = "validation loss" | |
objective_type = "Minimize" | |
metric_definitions = [ | |
{"Name": objective_metric_name, | |
"Regex": "validation_loss=([0-9\\.]+)"} | |
] | |
tuner = HyperparameterTuner(estimator, | |
objective_metric_name, | |
hyperparameter_ranges, | |
metric_definitions, | |
max_jobs=3, | |
max_parallel_jobs=1, | |
objective_type=objective_type) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment