Commit dc448bda authored by Yuxin Wu's avatar Yuxin Wu

Add 'name' to layer signature in documentation

parent 0b226adb
......@@ -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
......
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment