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
7158eede
Commit
7158eede
authored
Dec 04, 2018
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avoid divide-by-zero in GPUUtilizationTracker (#999)
parent
e51323c1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
docs/tutorial/summary.md
docs/tutorial/summary.md
+10
-0
tensorpack/callbacks/prof.py
tensorpack/callbacks/prof.py
+4
-3
No files found.
docs/tutorial/summary.md
View file @
7158eede
...
@@ -61,3 +61,13 @@ As long as the type of data is supported, the data will be dispatched to and log
...
@@ -61,3 +61,13 @@ As long as the type of data is supported, the data will be dispatched to and log
As a result, tensorboard will show not only summaries in the graph, but also your custom data.
As a result, tensorboard will show not only summaries in the graph, but also your custom data.
For example, a precise validation error often needs to be computed manually, outside the TensorFlow graph.
For example, a precise validation error often needs to be computed manually, outside the TensorFlow graph.
With a uniform monitor backend, this number will show up in tensorboard as well.
With a uniform monitor backend, this number will show up in tensorboard as well.
### Textual Logs
```
python
from
tensorpack.utils
import
logger
# logger has the methods of Python's logging.Logger
logger
.
info
(
"Hello World!"
)
```
See
[
APIs of utils.logger
](
../modules/utils.html#module-tensorpack.utils.logger
)
tensorpack/callbacks/prof.py
View file @
7158eede
...
@@ -105,9 +105,10 @@ class GPUUtilizationTracker(Callback):
...
@@ -105,9 +105,10 @@ class GPUUtilizationTracker(Callback):
if
stop_evt
.
is_set
():
# or on exit
if
stop_evt
.
is_set
():
# or on exit
return
return
evt
.
clear
()
evt
.
clear
()
# Ignore the last datapoint. Usually is zero, makes us underestimate the util.
if
cnt
>
1
:
stats
-=
data
# Ignore the last datapoint. Usually is zero, makes us underestimate the util.
cnt
-=
1
stats
-=
data
cnt
-=
1
rst_queue
.
put
(
stats
/
cnt
)
rst_queue
.
put
(
stats
/
cnt
)
break
break
...
...
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