From c58ba827bb26435628d2e65e632cb98ad760dae8 Mon Sep 17 00:00:00 2001 From: "yi.wu" Date: Wed, 13 Jun 2018 21:15:16 +0800 Subject: [PATCH] update --- paddle/fluid/operators/conv_transpose_op.cc | 2 +- paddle/fluid/operators/crf_decoding_op.cc | 3 --- paddle/fluid/operators/roi_pool_op.cc | 2 ++ python/paddle/fluid/layers/io.py | 5 +++-- python/paddle/fluid/layers/nn.py | 14 ++++++-------- 5 files changed, 12 insertions(+), 14 deletions(-) diff --git a/paddle/fluid/operators/conv_transpose_op.cc b/paddle/fluid/operators/conv_transpose_op.cc index 0b363f5c43..2e9e957ebd 100644 --- a/paddle/fluid/operators/conv_transpose_op.cc +++ b/paddle/fluid/operators/conv_transpose_op.cc @@ -156,7 +156,7 @@ Parameters(strides, paddings) are two elements. These two elements represent hei and width, respectively. The input(X) size and output(Out) size may be different. -Example: +For an example: Input: Input shape: $(N, C_{in}, H_{in}, W_{in})$ Filter shape: $(C_{in}, C_{out}, H_f, W_f)$ diff --git a/paddle/fluid/operators/crf_decoding_op.cc b/paddle/fluid/operators/crf_decoding_op.cc index a8d7831122..c27befe114 100644 --- a/paddle/fluid/operators/crf_decoding_op.cc +++ b/paddle/fluid/operators/crf_decoding_op.cc @@ -53,17 +53,14 @@ sequence of observed tags. The output of this operator changes according to whether Input(Label) is given: 1. Input(Label) is given: - This happens in training. This operator is used to co-work with the chunk_eval operator. - When Input(Label) is given, the crf_decoding operator returns a row vector with shape [N x 1] whose values are fixed to be 0, indicating an incorrect prediction, or 1 indicating a tag is correctly predicted. Such an output is the input to chunk_eval operator. 2. Input(Label) is not given: - This is the standard decoding process. The crf_decoding operator returns a row vector with shape [N x 1] whose values diff --git a/paddle/fluid/operators/roi_pool_op.cc b/paddle/fluid/operators/roi_pool_op.cc index a6247a467a..3dec59e247 100644 --- a/paddle/fluid/operators/roi_pool_op.cc +++ b/paddle/fluid/operators/roi_pool_op.cc @@ -149,7 +149,9 @@ The operator has three steps: 1. Dividing each region proposal into equal-sized sections with the pooled_width and pooled_height + 2. Finding the largest value in each section + 3. Copying these max values to the output buffer ROI Pooling for Faster-RCNN. The link below is a further introduction: diff --git a/python/paddle/fluid/layers/io.py b/python/paddle/fluid/layers/io.py index 65b9c68885..76ef82ddb0 100644 --- a/python/paddle/fluid/layers/io.py +++ b/python/paddle/fluid/layers/io.py @@ -109,8 +109,6 @@ class BlockGuardServ(BlockGuard): class ListenAndServ(object): """ - ListenAndServ layer. - ListenAndServ is used to create a rpc server bind and listen on specific TCP port, this server will run the sub-block when received variables from clients. @@ -121,6 +119,9 @@ class ListenAndServ(object): fan_in(int): how many client are expected to report to this server, default: 1. optimizer_mode(bool): whether to run the server as a parameter server, default: True. + Returns: + None + Examples: .. code-block:: python diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index 40134ed42f..4fb3ac4a92 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -806,7 +806,7 @@ def crf_decoding(input, param_attr, label=None): label(${label_type}): ${label_comment} Returns: - ${viterbi_path_comment} + Variable: ${viterbi_path_comment} """ helper = LayerHelper('crf_decoding', **locals()) transition = helper.get_parameter(param_attr.name) @@ -828,7 +828,7 @@ def cos_sim(X, Y): Args: X (Variable): ${x_comment} - Y (Variable): ${x_comment} + Y (Variable): ${y_comment} Returns: Variable: the output of cosine(X, Y). @@ -1036,9 +1036,9 @@ def chunk_eval(input, excluded_chunk_types (list): ${excluded_chunk_types_comment} Returns: - tuple: tuple containing: (precision, recall, f1_score, - num_infer_chunks, num_label_chunks, - num_correct_chunks) + tuple: tuple containing: precision, recall, f1_score, + num_infer_chunks, num_label_chunks, + num_correct_chunks """ helper = LayerHelper("chunk_eval", **locals()) @@ -3050,8 +3050,6 @@ def nce(input, def transpose(x, perm, name=None): """ - **transpose Layer** - Permute the dimensions of `input` according to `perm`. The `i`-th dimension of the returned tensor will correspond to the @@ -3918,7 +3916,7 @@ def roi_pool(input, rois, pooled_height=1, pooled_width=1, spatial_scale=1.0): spatial_scale (float): ${spatial_scale_comment} Default: 1.0 Returns: - roi_pool (Variable): ${out_comment}. + Variable: ${out_comment}. Examples: .. code-block:: python -- GitLab