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
dc448bda
Commit
dc448bda
authored
Jul 31, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 'name' to layer signature in documentation
parent
0b226adb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
docs/conf.py
docs/conf.py
+5
-0
tensorpack/models/common.py
tensorpack/models/common.py
+5
-5
No files found.
docs/conf.py
View file @
dc448bda
...
...
@@ -331,12 +331,17 @@ texinfo_documents = [
suppress_warnings
=
[
'image.nonlocal_uri'
]
#autodoc_member_order = 'bysource'
def
process_signature
(
app
,
what
,
name
,
obj
,
options
,
signature
,
return_annotation
):
if
signature
:
# replace Mock function names
signature
=
re
.
sub
(
'<Mock name=
\'
([^
\'
]+)
\'
.*>'
,
'
\
g<1>'
,
signature
)
signature
=
re
.
sub
(
'tensorflow'
,
'tf'
,
signature
)
if
hasattr
(
obj
,
'use_scope'
)
and
hasattr
(
obj
,
'symbolic_function'
):
if
obj
.
use_scope
:
signature
=
signature
[
0
]
+
'name, '
+
signature
[
1
:]
# signature: arg list
return
signature
,
return_annotation
...
...
tensorpack/models/common.py
View file @
dc448bda
...
...
@@ -11,7 +11,7 @@ import copy
from
..tfutils.argscope
import
get_arg_scope
from
..tfutils.model_utils
import
get_shape_str
from
..utils
import
logger
from
..utils.develop
import
building_rtfd
#
from ..utils.develop import building_rtfd
# make sure each layer is only logged once
_LAYER_LOGGED
=
set
()
...
...
@@ -147,9 +147,9 @@ def layer_register(
_register
(
func
.
__name__
,
wrapped_func
)
return
wrapped_func
if
building_rtfd
():
# preserve argspec
from
decorator
import
decorator
wrapper
=
decorator
(
wrapper
)
#
if building_rtfd():
#
#
preserve argspec
#
from decorator import decorator
#
wrapper = decorator(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