-
Notifications
You must be signed in to change notification settings - Fork 86
Fix a stability about multiple measurements #1001
Fix a stability about multiple measurements #1001
Conversation
This PR needs Approvals as follows.
Please choose reviewers and requet reviews! Click to see how to approve each reviewsYou can approve this PR by triggered comments as follows.
See all trigger commentsPlease replace [Target] to review target
|
This log is from original
|
This is a log from improved
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OA
output_template/python/run.py
Outdated
@@ -93,12 +96,12 @@ def _init(model, config): | |||
return nn | |||
|
|||
|
|||
def _run(nn, image_data): | |||
def _run(image_data, nn): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I missed this line.
Why did change order of arguments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this line because the similar functions (_pre_process, _run, _post_process) should have same order of argument.
But when I checked my code again, my current code is also not so ruled that I can recover original code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iizukak
The changing order has been recovered to original code
output_template/python/run.py
Outdated
"pre": {"mean": np.mean(results_pre), "std": np.std(results_pre), }, | ||
"post": {"mean": np.mean(results_post), "std": np.std(results_post), }, | ||
"run": {"mean": np.mean(results_run), "std": np.std(results_run), }, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tk26eng Sorry, I missed this.
This line looks return tuple. This is what you want?
In [1]: a = {"a": 0, "b": 1}
In [2]: b = {"a": 0, "b": 1},
In [3]: type(a)
Out[3]: dict
In [4]: type(b)
Out[4]: tuple
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
Dict type is what I wanted to use.
I fixed this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iizukak
Can I go to Readability Review ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tk26eng yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
Suggested some small changes.
output_template/python/run.py
Outdated
|
||
# add the batch dimension | ||
image_data = np.expand_dims(image_data, axis=0) | ||
funcs = [(_pre_process, image_data), _run, _post_process] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
funcs
seems not to be used.
Co-authored-by: Taketoshi Fujiwara <[email protected]>
Co-authored-by: Taketoshi Fujiwara <[email protected]>
Co-authored-by: Taketoshi Fujiwara <[email protected]>
Co-authored-by: Taketoshi Fujiwara <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Readability Approval
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OA
/ready |
⏳Merge job is queued... |
😥This PR is not approved yet. |
/ready |
⏳Merge job is queued... |
What this patch does to fix the issue.
Link to any relevant issues or pull requests.
Fix #929