polish api ref docs

wangkuiyi-patch-1
yi.wu 7 years ago
parent 5be454bf33
commit efcff3d9e5

@ -790,6 +790,12 @@ shape
.. autofunction:: paddle.fluid.layers.shape .. autofunction:: paddle.fluid.layers.shape
:noindex: :noindex:
iou_similarity
-----
.. autofunction:: paddle.fluid.layers.iou_similarity
:noindex:
sigmoid sigmoid
------- -------

@ -69,10 +69,11 @@ class IOUSimilarityOpMaker : public framework::OpProtoAndCheckerMaker {
AddComment(R"DOC( AddComment(R"DOC(
IOU Similarity Operator. IOU Similarity Operator.
Computes intersection-over-union (IOU) between two box lists. Computes intersection-over-union (IOU) between two box lists.
Box list 'X' should be a LoDTensor and 'Y' is a common Tensor, Box list 'X' should be a LoDTensor and 'Y' is a common Tensor,
boxes in 'Y' are shared by all instance of the batched inputs of X. boxes in 'Y' are shared by all instance of the batched inputs of X.
Given two boxes A and B, the calculation of IOU is as follows: Given two boxes A and B, the calculation of IOU is as follows:
$$ $$
IOU(A, B) = IOU(A, B) =

@ -146,6 +146,7 @@ is to perform max pooling on inputs of nonuniform sizes to obtain
fixed-size feature maps (e.g. 7*7). fixed-size feature maps (e.g. 7*7).
The operator has three steps: The operator has three steps:
1. Dividing each region proposal into equal-sized sections with 1. Dividing each region proposal into equal-sized sections with
the pooled_width and pooled_height the pooled_width and pooled_height
2. Finding the largest value in each section 2. Finding the largest value in each section

@ -135,8 +135,8 @@ class ListenAndServ(object):
fluid.initializer.Constant(value=1.0)(x, main.global_block()) fluid.initializer.Constant(value=1.0)(x, main.global_block())
layers.scale(x=x, scale=10.0, out=out_var) layers.scale(x=x, scale=10.0, out=out_var)
self.server_exe = fluid.Executor(place) exe = fluid.Executor(place)
self.server_exe.run(main) exe.run(main)
""" """
def __init__(self, endpoint, inputs, fan_in=1, optimizer_mode=True): def __init__(self, endpoint, inputs, fan_in=1, optimizer_mode=True):

@ -850,7 +850,9 @@ def crf_decoding(input, param_attr, label=None):
Args: Args:
input(${emission_type}): ${emission_comment} input(${emission_type}): ${emission_comment}
param_attr(ParamAttr): The parameter attribute for training. param_attr(ParamAttr): The parameter attribute for training.
label(${label_type}): ${label_comment} label(${label_type}): ${label_comment}
Returns: Returns:
@ -875,8 +877,8 @@ def cos_sim(X, Y):
${comment} ${comment}
Args: Args:
X(${X_type}): ${X_comment} X(${x_type}): ${x_comment}
Y(${Y_type}): ${Y_comment} Y(${y_type}): ${x_comment}
Returns: Returns:
A Variable contains the output of this layer. A Variable contains the output of this layer.
@ -1076,13 +1078,18 @@ def chunk_eval(input,
${comment} ${comment}
Args: Args:
input(Variable): ${Inference_comment} input(Variable): ${inference_comment}
label(Variable): ${Label_comment}
label(Variable): ${label_comment}
chunk_scheme(${chunk_scheme_type}): ${chunk_scheme_comment} chunk_scheme(${chunk_scheme_type}): ${chunk_scheme_comment}
num_chunk_types(${num_chunk_types_type}): ${num_chunk_types_comment} num_chunk_types(${num_chunk_types_type}): ${num_chunk_types_comment}
excluded_chunk_types(${excluded_chunk_types_type}): ${excluded_chunk_types_comment} excluded_chunk_types(${excluded_chunk_types_type}): ${excluded_chunk_types_comment}
Returns(typle): a tuple of variables: Returns:
chunk_eval(tuple): a tuple of variables:
(precision, recall, f1_score, num_infer_chunks, num_label_chunks, num_correct_chunks) (precision, recall, f1_score, num_infer_chunks, num_label_chunks, num_correct_chunks)
""" """
@ -1755,7 +1762,6 @@ def beam_search_decode(ids, scores, name=None):
return sentence_ids, sentence_scores return sentence_ids, sentence_scores
@templatedoc()
def conv2d_transpose(input, def conv2d_transpose(input,
num_filters, num_filters,
output_size=None, output_size=None,
@ -3893,14 +3899,18 @@ def roi_pool(input, rois, pooled_height=1, pooled_width=1, spatial_scale=1.0):
${comment} ${comment}
Args: Args:
input (Variable): ${X_comment} input (Variable): ${x_comment}
rois (Variable): ${ROIs_comment}
rois (Variable): ROIs (Regions of Interest) to pool over.
pooled_height (integer): ${pooled_height_comment} Default: 1 pooled_height (integer): ${pooled_height_comment} Default: 1
pooled_width (integer): ${pooled_width_comment} Default: 1 pooled_width (integer): ${pooled_width_comment} Default: 1
spatial_scale (float): ${spatial_scale_comment} Default: 1.0 spatial_scale (float): ${spatial_scale_comment} Default: 1.0
Returns: Returns:
pool_out (Variable): ${Out_comment}. roi_pool (Variable): ${out_comment}.
Examples: Examples:
.. code-block:: python .. code-block:: python

Loading…
Cancel
Save