Skip to content

Commit 1c9fc65

Browse files
committed
update
1 parent e2783bb commit 1c9fc65

File tree

3 files changed

+48
-45
lines changed

3 files changed

+48
-45
lines changed

python/paddle/fluid/layers/detection.py

Lines changed: 39 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ def prior_box(input,
603603
offset=0.5,
604604
name=None):
605605
"""
606-
**Prior box operator**
606+
**Prior Box Operator**
607607
608608
Generate prior boxes for SSD(Single Shot MultiBox Detector) algorithm.
609609
Each position of the input produce N prior boxes, N is determined by
@@ -632,26 +632,30 @@ def prior_box(input,
632632
name(str): Name of the prior box op. Default: None.
633633
634634
Returns:
635-
boxes(Variable): the output prior boxes of PriorBox.
636-
The layout is [H, W, num_priors, 4].
637-
H is the height of input, W is the width of input,
638-
num_priors is the total
639-
box count of each position of input.
640-
Variances(Variable): the expanded variances of PriorBox.
641-
The layout is [H, W, num_priors, 4].
642-
H is the height of input, W is the width of input
643-
num_priors is the total
644-
box count of each position of input
635+
tuple: A tuple with two Variable (boxes, variances)
636+
637+
boxes: the output prior boxes of PriorBox.
638+
The layout is [H, W, num_priors, 4].
639+
H is the height of input, W is the width of input,
640+
num_priors is the total
641+
box count of each position of input.
642+
643+
variances: the expanded variances of PriorBox.
644+
The layout is [H, W, num_priors, 4].
645+
H is the height of input, W is the width of input
646+
num_priors is the total
647+
box count of each position of input
645648
646649
647650
Examples:
648651
.. code-block:: python
649-
box, var = prior_box(
650-
input=conv1,
651-
image=images,
652-
min_sizes=[100.],
653-
flip=True,
654-
clip=True)
652+
653+
box, var = fluid.layers.prior_box(
654+
input=conv1,
655+
image=images,
656+
min_sizes=[100.],
657+
flip=True,
658+
clip=True)
655659
"""
656660
helper = LayerHelper("prior_box", **locals())
657661
dtype = helper.input_dtype()
@@ -721,11 +725,9 @@ def multi_box_head(inputs,
721725
stride=1,
722726
name=None):
723727
"""
724-
**Prior_boxes**
725-
726728
Generate prior boxes for SSD(Single Shot MultiBox Detector)
727729
algorithm. The details of this algorithm, please refer the
728-
section 2.2 of SSD paper (SSD: Single Shot MultiBox Detector)
730+
section 2.2 of SSD paper `SSD: Single Shot MultiBox Detector
729731
<https://arxiv.org/abs/1512.02325>`_ .
730732
731733
Args:
@@ -766,24 +768,27 @@ def multi_box_head(inputs,
766768
name(str): Name of the prior box layer. Default: None.
767769
768770
Returns:
769-
mbox_loc(Variable): The predicted boxes' location of the inputs.
770-
The layout is [N, H*W*Priors, 4]. where Priors
771-
is the number of predicted boxes each position of each input.
772-
mbox_conf(Variable): The predicted boxes' confidence of the inputs.
773-
The layout is [N, H*W*Priors, C]. where Priors
774-
is the number of predicted boxes each position of each input
775-
and C is the number of Classes.
776-
boxes(Variable): the output prior boxes of PriorBox.
777-
The layout is [num_priors, 4]. num_priors is the total
778-
box count of each position of inputs.
779-
Variances(Variable): the expanded variances of PriorBox.
780-
The layout is [num_priors, 4]. num_priors is the total
781-
box count of each position of inputs
771+
tuple: A tuple with four Variables. (mbox_loc, mbox_conf, boxes, variances)
772+
773+
mbox_loc: The predicted boxes' location of the inputs. The layout
774+
is [N, H*W*Priors, 4]. where Priors is the number of predicted
775+
boxes each position of each input.
776+
777+
mbox_conf: The predicted boxes' confidence of the inputs. The layout
778+
is [N, H*W*Priors, C]. where Priors is the number of predicted boxes
779+
each position of each input and C is the number of Classes.
780+
781+
boxes: the output prior boxes of PriorBox. The layout is [num_priors, 4].
782+
num_priors is the total box count of each position of inputs.
783+
784+
variances: the expanded variances of PriorBox. The layout is
785+
[num_priors, 4]. num_priors is the total box count of each position of inputs
782786
783787
784788
Examples:
785789
.. code-block:: python
786-
mbox_locs, mbox_confs, box, var = layers.multi_box_head(
790+
791+
mbox_locs, mbox_confs, box, var = fluid.layers.multi_box_head(
787792
inputs=[conv1, conv2, conv3, conv4, conv5, conv5],
788793
image=images,
789794
num_classes=21,

python/paddle/fluid/layers/learning_rate_scheduler.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,6 @@ def polynomial_decay(learning_rate,
163163
power=1.0,
164164
cycle=False):
165165
"""
166-
**Polynomial Decay**
167-
168166
Applies polynomial decay to the initial learning rate.
169167
170168
.. code-block:: python
@@ -178,14 +176,14 @@ def polynomial_decay(learning_rate,
178176
179177
Args:
180178
learning_rate(Variable|float32): A scalar float32 value or a Variable. This
181-
will be the initial learning rate during training
179+
will be the initial learning rate during training.
182180
decay_steps(int32): A Python `int32` number.
183-
end_learning_rate(float, Default: 0.0001): A Python `float` number.
184-
power(float, Default: 1.0): A Python `float` number
185-
cycle(bool, Default: False): Boolean. If set true, decay the learning rate every decay_steps.
181+
end_learning_rate(float): A Python `float` number.
182+
power(float): A Python `float` number.
183+
cycle(bool): If set true, decay the learning rate every decay_steps.
186184
187185
Returns:
188-
The decayed learning rate
186+
Variable: The decayed learning rate
189187
"""
190188
global_step = _decay_step_counter()
191189

python/paddle/fluid/layers/tensor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@
4040

4141
def create_tensor(dtype, name=None, persistable=False):
4242
"""
43-
**Create a Tensor**
43+
Create an variable, which will hold a LoDTensor with data type dtype.
4444
4545
Args:
46-
dtype (string): 'float32'|'int32'|..., the data type of the
46+
dtype(string): 'float32'|'int32'|..., the data type of the
4747
created tensor.
48-
name (string, Default: None): The name of the created tensor, if not set,
48+
name(string): The name of the created tensor, if not set,
4949
the name will be a random unique one.
50-
persistable (bool, Default: False): Set the persistable flag of the create tensor.
50+
persistable(bool): Set the persistable flag of the create tensor.
5151
5252
Returns:
5353
Variable: The tensor variable storing the created tensor.

0 commit comments

Comments
 (0)