Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
e051fae0
Commit
e051fae0
authored
Feb 28, 2019
by
ShufanHuang
Committed by
chicm-ms
Mar 05, 2019
Browse files
Fix bug in Curvefitting Assessor (#798)
Fix bug in Curvefitting Assessor
parent
8353c1d3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
src/sdk/pynni/nni/curvefitting_assessor/curvefitting_assessor.py
.../pynni/nni/curvefitting_assessor/curvefitting_assessor.py
+5
-4
No files found.
src/sdk/pynni/nni/curvefitting_assessor/curvefitting_assessor.py
View file @
e051fae0
...
...
@@ -57,8 +57,8 @@ class CurvefittingAssessor(Assessor):
self
.
threshold
=
threshold
# Record the number of gap
self
.
gap
=
gap
# Record the number of
times of
judgment
s
self
.
judgment_num
=
0
# Record the number of
intermediate result in the lastest
judgment
self
.
last_
judgment_num
=
dict
()
# Record the best performance
self
.
set_best_performance
=
False
self
.
completed_best_performance
=
None
...
...
@@ -112,9 +112,10 @@ class CurvefittingAssessor(Assessor):
curr_step
=
len
(
trial_history
)
if
curr_step
<
self
.
start_step
:
return
AssessResult
.
Good
if
(
curr_step
-
self
.
start_step
)
//
self
.
gap
<=
self
.
judgment_num
:
if
trial_job_id
in
self
.
last_judgment_num
.
keys
()
and
curr_step
-
self
.
last_judgment_num
[
trial_job_id
]
<
self
.
gap
:
return
AssessResult
.
Good
self
.
judgment_num
=
(
curr_step
-
self
.
start_step
)
//
self
.
gap
self
.
last_
judgment_num
[
trial_job_id
]
=
curr_step
try
:
start_time
=
datetime
.
datetime
.
now
()
...
...
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