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
7e32ccc7
Commit
7e32ccc7
authored
Jun 18, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ratiocounter
parent
81bb9ac2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tensorpack/utils/stat.py
tensorpack/utils/stat.py
+3
-3
No files found.
tensorpack/utils/stat.py
View file @
7e32ccc7
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
# Author: Yuxin Wu <ppwwyyxx@gmail.com>
# Author: Yuxin Wu <ppwwyyxx@gmail.com>
import
numpy
as
np
import
numpy
as
np
__all__
=
[
'StatCounter'
,
'Accuracy'
,
'BinaryStatistics'
,
'Ratio
Statistics
'
]
__all__
=
[
'StatCounter'
,
'Accuracy'
,
'BinaryStatistics'
,
'Ratio
Counter
'
]
class
StatCounter
(
object
):
class
StatCounter
(
object
):
def
__init__
(
self
):
def
__init__
(
self
):
...
@@ -34,7 +34,7 @@ class StatCounter(object):
...
@@ -34,7 +34,7 @@ class StatCounter(object):
assert
len
(
self
.
_values
)
assert
len
(
self
.
_values
)
return
max
(
self
.
_values
)
return
max
(
self
.
_values
)
class
Ratio
Statistics
(
object
):
class
Ratio
Counter
(
object
):
def
__init__
(
self
):
def
__init__
(
self
):
self
.
reset
()
self
.
reset
()
...
@@ -56,7 +56,7 @@ class RatioStatistics(object):
...
@@ -56,7 +56,7 @@ class RatioStatistics(object):
def
count
(
self
):
def
count
(
self
):
return
self
.
_tot
return
self
.
_tot
class
Accuracy
(
Ratio
Statistics
):
class
Accuracy
(
Ratio
Counter
):
@
property
@
property
def
accuracy
(
self
):
def
accuracy
(
self
):
return
self
.
ratio
return
self
.
ratio
...
...
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