Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
37e664f8
Commit
37e664f8
authored
Aug 04, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix performance regression
parent
c95292dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
tensorpack/models/model_desc.py
tensorpack/models/model_desc.py
+2
-1
tensorpack/utils/stat.py
tensorpack/utils/stat.py
+1
-2
No files found.
tensorpack/models/model_desc.py
View file @
37e664f8
...
@@ -72,7 +72,8 @@ class ModelDesc(object):
...
@@ -72,7 +72,8 @@ class ModelDesc(object):
def
get_gradient_processor
(
self
):
def
get_gradient_processor
(
self
):
""" Return a list of GradientProcessor. They will be executed in order"""
""" Return a list of GradientProcessor. They will be executed in order"""
return
[
#SummaryGradient(),
return
[
#SummaryGradient(),
CheckGradient
()]
#CheckGradient()
]
class
ModelFromMetaGraph
(
ModelDesc
):
class
ModelFromMetaGraph
(
ModelDesc
):
...
...
tensorpack/utils/stat.py
View file @
37e664f8
...
@@ -85,8 +85,7 @@ class BinaryStatistics(object):
...
@@ -85,8 +85,7 @@ class BinaryStatistics(object):
:param pred: 0/1 np array
:param pred: 0/1 np array
:param label: 0/1 np array of the same size
:param label: 0/1 np array of the same size
"""
"""
nr
=
label
.
size
assert
pred
.
shape
==
label
.
shape
assert
pred
.
size
==
label
.
size
self
.
nr_pos
+=
(
label
==
1
)
.
sum
()
self
.
nr_pos
+=
(
label
==
1
)
.
sum
()
self
.
nr_neg
+=
(
label
==
0
)
.
sum
()
self
.
nr_neg
+=
(
label
==
0
)
.
sum
()
self
.
nr_pred_pos
+=
(
pred
==
1
)
.
sum
()
self
.
nr_pred_pos
+=
(
pred
==
1
)
.
sum
()
...
...
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