Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
afb4e78c
Commit
afb4e78c
authored
Aug 05, 2019
by
suiguoxin
Browse files
update gridsearch quniform to conform with BOHB
parent
05913424
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
src/sdk/pynni/nni/gridsearch_tuner/gridsearch_tuner.py
src/sdk/pynni/nni/gridsearch_tuner/gridsearch_tuner.py
+2
-3
No files found.
src/sdk/pynni/nni/gridsearch_tuner/gridsearch_tuner.py
View file @
afb4e78c
...
...
@@ -97,9 +97,8 @@ class GridSearchTuner(Tuner):
def
_parse_quniform
(
self
,
param_value
):
'''parse type of quniform parameter and return a list'''
low
,
high
,
interval
=
param_value
[
0
],
param_value
[
1
],
param_value
[
2
]
count
=
int
(
np
.
floor
((
high
-
low
)
/
interval
))
+
1
return
[
low
+
interval
*
i
for
i
in
range
(
count
)]
low
,
high
,
q
=
param_value
[
0
],
param_value
[
1
],
param_value
[
2
]
return
np
.
clip
(
np
.
arange
(
np
.
round
(
low
/
q
),
np
.
round
(
high
/
q
)
+
1
)
*
q
,
low
,
high
)
def
_parse_randint
(
self
,
param_value
):
'''parse type of randint parameter and return a list'''
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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