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
e63d8b7e
Commit
e63d8b7e
authored
Jul 23, 2019
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update docs
parent
34e8d817
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
5 deletions
+19
-5
docs/tutorial/intro.rst
docs/tutorial/intro.rst
+2
-1
docs/tutorial/trainer.md
docs/tutorial/trainer.md
+1
-1
tensorpack/utils/utils.py
tensorpack/utils/utils.py
+16
-3
No files found.
docs/tutorial/intro.rst
View file @
e63d8b7e
...
...
@@ -15,7 +15,8 @@ The Tensorpack API brings speed and flexibility together.
Is TensorFlow Slow?
~~~~~~~~~~~~~~~~~~~~~
*******************
There is a common misconception,
but no, it's not slow. But it's not easy to write it in an efficient way.
...
...
docs/tutorial/trainer.md
View file @
e63d8b7e
tensorpack/utils/utils.py
View file @
e63d8b7e
...
...
@@ -69,17 +69,30 @@ def humanize_time_delta(sec):
def
change_env
(
name
,
val
):
"""
Args:
name(str), val(str):
name(str): name of the env var
val(str or None): the value, or set to None to clear the env var.
Returns:
a context where the environment variable ``name`` being set to
``val``. It will be set back after the context exits.
"""
oldval
=
os
.
environ
.
get
(
name
,
None
)
if
val
is
None
:
try
:
del
os
.
environ
[
name
]
except
KeyError
:
pass
else
:
os
.
environ
[
name
]
=
val
yield
if
oldval
is
None
:
try
:
del
os
.
environ
[
name
]
except
KeyError
:
pass
else
:
os
.
environ
[
name
]
=
oldval
...
...
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