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
71fe18c2
Commit
71fe18c2
authored
Nov 18, 2020
by
lucas_miranda
Browse files
Changed default hyperparameter values
parent
3b845054
Changes
1
Hide whitespace changes
Inline
Side-by-side
deepof/train_utils.py
View file @
71fe18c2
...
...
@@ -7,7 +7,7 @@
Simple utility functions used in deepof example scripts. These are not part of the main package
"""
from
datetime
import
datetime
from
datetime
import
date
,
datetime
from
kerastuner
import
BayesianOptimization
from
kerastuner
import
HyperParameters
...
...
@@ -62,7 +62,7 @@ def load_treatments(train_path):
def
get_callbacks
(
X_train
:
np
.
array
,
batch_size
:
int
,
cp
:
bool
,
variational
:
bool
,
predictor
:
float
,
loss
:
str
,
)
->
Tuple
:
)
->
List
[
Union
[
Any
]]
:
"""Generates callbacks for model training, including:
- run_ID: run name, with coarse parameter details;
- tensorboard_callback: for real-time visualization;
...
...
@@ -169,7 +169,7 @@ def tune_search(
tuner
=
BayesianOptimization
(
hypermodel
,
directory
=
"BayesianOptx
"
,
directory
=
"BayesianOptx
_{}_{}"
.
format
(
loss
,
str
(
date
.
today
()))
,
executions_per_trial
=
n_replicas
,
logger
=
TensorBoardLogger
(
metrics
=
[
"val_mae"
],
logdir
=
"./logs/hparams"
),
max_trials
=
bayopt_trials
,
...
...
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