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
82afb459
You need to sign in or sign up before continuing.
Commit
82afb459
authored
Jul 31, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve documents
parent
01c25a9f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
10 deletions
+18
-10
docs/conf.py
docs/conf.py
+15
-0
docs/requirements.txt
docs/requirements.txt
+1
-1
tensorpack/dataflow/prefetch.py
tensorpack/dataflow/prefetch.py
+1
-1
tensorpack/models/batch_norm.py
tensorpack/models/batch_norm.py
+1
-2
tensorpack/models/common.py
tensorpack/models/common.py
+0
-6
No files found.
docs/conf.py
View file @
82afb459
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
import
sys
,
os
,
re
import
sys
,
os
,
re
import
mock
import
mock
import
inspect
# If extensions (or modules to document with autodoc) are in another directory,
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# add these directories to sys.path here. If the directory is relative to the
...
@@ -339,15 +340,29 @@ def process_signature(app, what, name, obj, options, signature,
...
@@ -339,15 +340,29 @@ def process_signature(app, what, name, obj, options, signature,
# replace Mock function names
# replace Mock function names
signature
=
re
.
sub
(
'<Mock name=
\'
([^
\'
]+)
\'
.*>'
,
'
\
g<1>'
,
signature
)
signature
=
re
.
sub
(
'<Mock name=
\'
([^
\'
]+)
\'
.*>'
,
'
\
g<1>'
,
signature
)
signature
=
re
.
sub
(
'tensorflow'
,
'tf'
,
signature
)
signature
=
re
.
sub
(
'tensorflow'
,
'tf'
,
signature
)
# add scope name to layer signatures:
if
hasattr
(
obj
,
'use_scope'
)
and
hasattr
(
obj
,
'symbolic_function'
):
if
hasattr
(
obj
,
'use_scope'
)
and
hasattr
(
obj
,
'symbolic_function'
):
if
obj
.
use_scope
:
if
obj
.
use_scope
:
signature
=
signature
[
0
]
+
'name, '
+
signature
[
1
:]
signature
=
signature
[
0
]
+
'name, '
+
signature
[
1
:]
# signature: arg list
# signature: arg list
return
signature
,
return_annotation
return
signature
,
return_annotation
def
autodoc_skip_member
(
app
,
what
,
name
,
obj
,
skip
,
options
):
if
name
in
[
'get_data'
,
'size'
,
'reset_state'
]:
# skip these methods with empty docstring
if
not
obj
.
__doc__
and
inspect
.
isfunction
(
obj
):
# https://stackoverflow.com/questions/3589311/get-defining-class-of-unbound-method-object-in-python-3
cls
=
getattr
(
inspect
.
getmodule
(
obj
),
obj
.
__qualname__
.
split
(
'.<locals>'
,
1
)[
0
]
.
rsplit
(
'.'
,
1
)[
0
])
if
issubclass
(
cls
,
tensorpack
.
DataFlow
):
return
True
return
None
def
setup
(
app
):
def
setup
(
app
):
from
recommonmark.transform
import
AutoStructify
from
recommonmark.transform
import
AutoStructify
app
.
connect
(
'autodoc-process-signature'
,
process_signature
)
app
.
connect
(
'autodoc-process-signature'
,
process_signature
)
app
.
connect
(
'autodoc-skip-member'
,
autodoc_skip_member
)
app
.
add_config_value
(
app
.
add_config_value
(
'recommonmark_config'
,
'recommonmark_config'
,
{
'url_resolver'
:
lambda
url
:
\
{
'url_resolver'
:
lambda
url
:
\
...
...
docs/requirements.txt
View file @
82afb459
...
@@ -3,7 +3,7 @@ numpy
...
@@ -3,7 +3,7 @@ numpy
tqdm
tqdm
decorator
decorator
tensorflow
tensorflow
Sphinx>=1.
5.1
Sphinx>=1.
6
recommonmark==0.4.0
recommonmark==0.4.0
sphinx_rtd_theme
sphinx_rtd_theme
mock
mock
tensorpack/dataflow/prefetch.py
View file @
82afb459
...
@@ -108,7 +108,7 @@ class PrefetchDataZMQ(ProxyDataFlow):
...
@@ -108,7 +108,7 @@ class PrefetchDataZMQ(ProxyDataFlow):
communication.
communication.
A local directory is needed to put the ZMQ pipes.
A local directory is needed to put the ZMQ pipes.
You can set this with env var
$TENSORPACK_PIPEDIR
if you're running on non-local FS such as NFS or GlusterFS.
You can set this with env var
``$TENSORPACK_PIPEDIR``
if you're running on non-local FS such as NFS or GlusterFS.
Note that this dataflow is not fork-safe. You cannot nest this dataflow
Note that this dataflow is not fork-safe. You cannot nest this dataflow
into another PrefetchDataZMQ or PrefetchData.
into another PrefetchDataZMQ or PrefetchData.
...
...
tensorpack/models/batch_norm.py
View file @
82afb459
...
@@ -87,8 +87,7 @@ def BatchNorm(x, use_local_stat=None, decay=0.9, epsilon=1e-5,
...
@@ -87,8 +87,7 @@ def BatchNorm(x, use_local_stat=None, decay=0.9, epsilon=1e-5,
Variable Names:
Variable Names:
* ``beta``: the bias term. Will be zero-inited by default.
* ``beta``: the bias term. Will be zero-inited by default.
* ``gamma``: the scale term. Will be one-inited by default.
* ``gamma``: the scale term. Will be one-inited by default. Input will be transformed by ``x * gamma + beta``.
Input will be transformed by ``x * gamma + beta``.
* ``mean/EMA``: the moving average of mean.
* ``mean/EMA``: the moving average of mean.
* ``variance/EMA``: the moving average of variance.
* ``variance/EMA``: the moving average of variance.
...
...
tensorpack/models/common.py
View file @
82afb459
...
@@ -11,7 +11,6 @@ import copy
...
@@ -11,7 +11,6 @@ import copy
from
..tfutils.argscope
import
get_arg_scope
from
..tfutils.argscope
import
get_arg_scope
from
..tfutils.model_utils
import
get_shape_str
from
..tfutils.model_utils
import
get_shape_str
from
..utils
import
logger
from
..utils
import
logger
# from ..utils.develop import building_rtfd
# make sure each layer is only logged once
# make sure each layer is only logged once
_LAYER_LOGGED
=
set
()
_LAYER_LOGGED
=
set
()
...
@@ -147,9 +146,4 @@ def layer_register(
...
@@ -147,9 +146,4 @@ def layer_register(
_register
(
func
.
__name__
,
wrapped_func
)
_register
(
func
.
__name__
,
wrapped_func
)
return
wrapped_func
return
wrapped_func
# if building_rtfd():
# # preserve argspec
# from decorator import decorator
# wrapper = decorator(wrapper)
return
wrapper
return
wrapper
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