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
5134338e
Commit
5134338e
authored
Jul 30, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean-up docs and imports
parent
a0619cd6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
14 deletions
+24
-14
docs/modules/utils.rst
docs/modules/utils.rst
+0
-8
tensorpack/models/shape_utils.py
tensorpack/models/shape_utils.py
+1
-1
tensorpack/utils/globvars.py
tensorpack/utils/globvars.py
+21
-3
tensorpack/utils/utils.py
tensorpack/utils/utils.py
+2
-2
No files found.
docs/modules/utils.rst
View file @
5134338e
...
@@ -51,14 +51,6 @@ tensorpack.utils.logger module
...
@@ -51,14 +51,6 @@ tensorpack.utils.logger module
:show-inheritance:
:show-inheritance:
tensorpack.utils.rect module
----------------------------
.. automodule:: tensorpack.utils.rect
:members:
:undoc-members:
:show-inheritance:
tensorpack.utils.serialize module
tensorpack.utils.serialize module
---------------------------------
---------------------------------
...
...
tensorpack/models/shape_utils.py
View file @
5134338e
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
import
tensorflow
as
tf
import
tensorflow
as
tf
__all__
=
[
'StaticDynamicAxis'
,
'StaticDynamicShape'
]
__all__
=
[]
class
StaticDynamicAxis
(
object
):
class
StaticDynamicAxis
(
object
):
...
...
tensorpack/utils/globvars.py
View file @
5134338e
...
@@ -7,7 +7,7 @@ import six
...
@@ -7,7 +7,7 @@ import six
import
argparse
import
argparse
from
.
import
logger
from
.
import
logger
__all__
=
[
'globalns'
]
__all__
=
[
'globalns'
,
'GlobalNS'
]
if
six
.
PY2
:
if
six
.
PY2
:
class
NS
:
class
NS
:
...
@@ -17,7 +17,12 @@ else:
...
@@ -17,7 +17,12 @@ else:
NS
=
types
.
SimpleNamespace
NS
=
types
.
SimpleNamespace
class
MyNS
(
NS
):
# TODO make it singleton
class
GlobalNS
(
NS
):
"""
The class of the globalns instance.
"""
def
use_argument
(
self
,
args
):
def
use_argument
(
self
,
args
):
"""
"""
Add the content of :class:`argparse.Namespace` to this ns.
Add the content of :class:`argparse.Namespace` to this ns.
...
@@ -32,4 +37,17 @@ class MyNS(NS):
...
@@ -32,4 +37,17 @@ class MyNS(NS):
setattr
(
self
,
k
,
v
)
setattr
(
self
,
k
,
v
)
globalns
=
MyNS
()
globalns
=
GlobalNS
()
"""
A namespace to store global variables.
Examples:
.. code-block:: none
import tensorpack.utils.globalns as G
G.depth = 18
G.batch_size = 1
G.use_argument(parser.parse_args())
"""
tensorpack/utils/utils.py
View file @
5134338e
...
@@ -14,8 +14,8 @@ import numpy as np
...
@@ -14,8 +14,8 @@ import numpy as np
__all__
=
[
'change_env'
,
__all__
=
[
'change_env'
,
'get_rng'
,
'get_rng'
,
'fix_rng_seed'
,
'fix_rng_seed'
,
'get_tqdm_kwargs'
,
#
'get_tqdm_kwargs',
'get_tqdm'
,
#
'get_tqdm',
'execute_only_once'
,
'execute_only_once'
,
]
]
...
...
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