Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lucas Miranda
deepOF
Commits
8ab9ac24
Commit
8ab9ac24
authored
Nov 27, 2020
by
lucas_miranda
Browse files
Added hyperband option to hyperparameter tuning pipeline
parent
868b7056
Pipeline
#88008
passed with stage
in 15 minutes and 22 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
deepof/train_model.py
View file @
8ab9ac24
...
...
@@ -429,7 +429,7 @@ else:
"val_mae"
,
patience
=
15
,
restore_best_weights
=
True
),
],
n_replicas
=
3
,
n_replicas
=
1
,
n_epochs
=
30
,
)
...
...
deepof/train_utils.py
View file @
8ab9ac24
...
...
@@ -9,7 +9,7 @@ Simple utility functions used in deepof example scripts. These are not part of t
"""
from
datetime
import
date
,
datetime
from
kerastuner
import
BayesianOptimization
from
kerastuner
import
BayesianOptimization
,
Hyperband
from
kerastuner
import
HyperParameters
from
kerastuner_tensorboard_logger
import
TensorBoardLogger
from
typing
import
Tuple
,
Union
,
Any
,
List
...
...
@@ -172,12 +172,12 @@ def tune_search(
else
:
return
False
tuner
=
BayesianOptimization
(
tuner
=
Hyperband
(
hypermodel
,
directory
=
"
BayesianOpt
x_{}_{}"
.
format
(
loss
,
str
(
date
.
today
())),
directory
=
"
HyperBand
x_{}_{}"
.
format
(
loss
,
str
(
date
.
today
())),
executions_per_trial
=
n_replicas
,
logger
=
TensorBoardLogger
(
metrics
=
[
"val_mae"
],
logdir
=
"./logs/hparams"
),
max_
trial
s
=
bayopt_trials
,
max_
epoch
s
=
bayopt_trials
,
objective
=
"val_mae"
,
project_name
=
project_name
,
seed
=
42
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment