提交 41296972 编写于 作者: G gaotingquan 提交者: Tingquan Gao

fix: fix comments

上级 f8ee6c0f
...@@ -119,8 +119,8 @@ class TheseusLayer(nn.Layer): ...@@ -119,8 +119,8 @@ class TheseusLayer(nn.Layer):
"""use 'replace_function' to modify the 'layer_name_pattern'. """use 'replace_function' to modify the 'layer_name_pattern'.
Args: Args:
layer_name_pattern (str): The name of target layer variable. layer_name_pattern (Union[str, List[str]]): The name of layer to be modified by 'replace_function'.
replace_function (FunctionType): The function to modify target layer, replace_function (FunctionType): The function to modify target layer specified by 'layer_name_pattern'.
Returns: Returns:
bool: 'True' if successful, 'False' otherwise. bool: 'True' if successful, 'False' otherwise.
...@@ -156,7 +156,7 @@ class TheseusLayer(nn.Layer): ...@@ -156,7 +156,7 @@ class TheseusLayer(nn.Layer):
"""stop forward and backward after 'stop_layer_name'. """stop forward and backward after 'stop_layer_name'.
Args: Args:
stop_layer_name (str): The name of target layer variable. stop_layer_name (str): The name of layer that stop forward and backward after this layer.
Returns: Returns:
bool: 'True' if successful, 'False' otherwise. bool: 'True' if successful, 'False' otherwise.
...@@ -193,13 +193,13 @@ class TheseusLayer(nn.Layer): ...@@ -193,13 +193,13 @@ class TheseusLayer(nn.Layer):
def update_res(self, def update_res(self,
return_patterns: Union[str, List[str]]) -> Dict[str, bool]: return_patterns: Union[str, List[str]]) -> Dict[str, bool]:
"""update the results needed returned. """update the results to be returned.
Args: Args:
return_patterns (Union[str, List[str]]): [description] return_patterns (Union[str, List[str]]): The name of layer to return output.
Returns: Returns:
Dict[str, bool]: The pattern(str) is be set successfully if True(bool), failed otherwise. Dict[str, bool]: The pattern(str) is be set successfully if 'True'(bool), failed if 'False'(bool).
""" """
class Handler(object): class Handler(object):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册